INTRODUCTION

RECIPIENT USE CASES

FINANCIAL ACCOUNT USE CASES

PAYMENT REASON USE CASES

TRANSACTION USE CASES

NOTE USE CASES

Design  /  Transaction Use Cases  /  Create a Transaction

Create a Transaction

Overview

In this use case, we’ll walk through creating a fund disbursement transaction. A transaction requires two Financial Accounts: a debit account and a credit account. These accounts must belong to the Business Account associated with the API key included in the request.

Debit Financial Account
The funds will be taken from this account. The debit account can be a Business Financial Account or a Recipient Financial Account.

Credit Financial Account
The funds will be disbursed to this account. The credit account can be a Business Financial Account or a Recipient Financial Account.

Prerequisites

Create any Recipient Financial Accounts needed for the transaction.

API Operation

Steps

Send a request to the following endpoint: POST ​/api​/external​/v1​/transactions
  • Include details about the transaction in the request body (debit and credit Financial Accounts, amount, provider, currency, and so on). For a list of required fields, see the API Reference.
  • Include a Basic Auth Authorization header where the username is your API key ID and the password is your API key secret.

Sample Request

The following request would create a new fund disbursement transaction.

				
					{
  "debitFinancialAccountId": "6a017f06-83a3-44b7-be6f-5e5cae4a9ed7",
  "creditFinancialAccountId": "4py56a34-4686-1539-c2ga-1a723g55dlq3",
  "paymentReasonId": "8th32z87-3845-9810-v7gu-1f827g98swk3",
  "amount": 1000.00,
  "provider": "MC_SEND",
  "currency": "USD",
  "countryCode": "CAN",
  "requestedSendDate": "",
  "receiverId": "7wu45p35-2178-3098-x6wg-2s749k37alk2",
  "receiverType": "RECIPIENT"
}
				
			

Sample Response

If the transaction creation request is successful, a unique ID is returned for the transaction. The Recipient Account details and the transaction status are also returned.

				
					{
  "id": "2av81w47-9367-1295-h4ng-1q520p28wfn1",
  "createdAt": "2021-07-01T17:40:22.601Z",
  "debitFinancialAccountId": "6a017f06-83a3-44b7-be6f-5e5cae4a9ed7",
  "debitFinancialAccountSnapshotId": "1wl83a98-1243-6856-g3sg-2s680s13pkm3",
  "maskedDebitAccountNumber": "**** 5784",
  "creditFinancialAccountId": "4py56a34-4686-1539-c2ga-1a723g55dlq3",
  "creditFinancialAccountSnapshotId": "5ws94h37-1792-6523-r3jn-9z754i34kin5",
  "maskedCreditAccountNumber": "**** 6999",
  "paymentReasonId": "8th32z87-3845-9810-v7gu-1f827g98swk3",
  "paymentReason": "Loan payouts",
  "amount": 1000.00,
  "provider": "MC_SEND",
  "currency": "USD",
  "countryCode": "CAN",
  "requestorId": "9qw98h31-3978-2498-g2ko-8w965t32kwe6",
  "requestorType": "BUSINESS_ACCOUNT",
  "requestedSendDate": "",
  "businessAccountId": "4hy47a98-2453-9867-u3qa-5p347q98kim4",
  "receiverId": "7wu45p35-2178-3098-x6wg-2s749k37alk2",
  "receiverType": "RECIPIENT",
  "recipientDto": {
    "id": "9kj43t32-2956-2886-x7dy-6r821w39kra3",
    "requestorId": "8hb21a87-3985-9217-a6zq-5y643x47hsa7",
    "businessAccountId": "4hy47a98-2453-9867-u3qa-5p347q98kim4",
    "clientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "createdAt": "2021-07-01T17:40:22.601Z",
    "businessRefId": "6ja43q62-0978-2536-b5ap-4i872q65kjt3",
    "createdSource": "SDK iOS",
    "firstName": "John",
    "middleName": "",
    "lastName": "Smith",
    "secondLastName": "",
    "email": "jsmith@xyz.com",
    "phoneNumber": "4161234567",
    "nationality": "Canadian",
    "dateOfBirth": "1970-07-08",
    "additionalInformation": "",
    "recipientType": "INDIVIDUAL",
    "businessName": "",
    "state": "ACTIVE"
  },
  "latestStatus": {
    "id": "7wd40g39-2150-2435-c3hy-3c216e28bzj0",
    "createdAt": "2021-07-01T17:40:22.601Z",
    "transactionId": "2av81w47-9367-1295-h4ng-1q520p28wfn1",
    "status": "NEW",
    "message": "Transaction creation successful"
  }
}
				
			
ON THIS PAGE