Transactions
Payments API operations for Transactions.
These operations are generated from the Payments API Swagger document. Use the sandbox host https://api.dhangodemo.com while testing and https://api.dhango.com in production.
GET /v1/transactions/{id}
Gets detailed information on a single transaction.
| Parameter | In | Required | Description |
|---|---|---|---|
id |
path | yes | The unique identifier of the transaction. |
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 200 | The transaction was found and the details are in the response body. All account numbers will be masked. | GetTransactionResponse |
| 404 | The transaction could not be found. |
GET /v1/transactions
Returns a list of transactions that match the search criteria.
| Parameter | In | Required | Description |
|---|---|---|---|
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. | |
batchId |
query | Filter for transactions in a given batch. | |
transactionEventType |
query | Filter by the type of event that initiated the transaction. If used in conjunction with the begin date and/or end date, this will filter by the date associated with that event. For example, specifying an event type of Refund as well as dates would filter for transactions that were refunded in that date range. | |
paymentMethodType |
query | Filter by payment method type. | |
beginDate |
query | The first date by which to filter. | |
endDate |
query | The last date by which to filter. | |
page |
query | The current page of the search results starting at 1. | |
pageSize |
query | The number of records per page. The default is 25 and the maximum is 50. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 200 | OK | GetTransactionResponseSearchResults |
POST /v1/transactions/pay
Attempts to initiate a payment using a specified payment method. This operation runs an authorization and capture on card transactions.
Supply the optional Idempotency-Key header to make this call safely retryable. Repeating the request with the same key and the same payload returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true, instead of creating a second transaction. If the account has become inactive since, the repeat is refused with the same 403 as any other request from an inactive account, and the transaction is returned again once it is active.
| Parameter | In | Required | Description |
|---|---|---|---|
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. | |
Idempotency-Key |
header | Optional. An opaque, caller-generated key (a UUID is recommended) of up to 200 characters that makes this request safely retryable. Keys are scoped to the acting account and are never reused across accounts. Retrying with the same key and the same request does not create a second transaction: it returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true. Reusing the key with a different request returns 422, and retrying while the original request is still being processed returns 409. If idempotency processing is temporarily unavailable the request is not processed and 503 is returned; retry later with the same key. Keys are retained for 7 days after the original request's outcome is known; after that the same key is treated as new. Omitting the header leaves the request's behaviour unchanged. |
Request body: PostPayRequest.
PostPayRequest
| Field | Type | Required | Description |
|---|---|---|---|
payer |
string | yes | The name of the payer. This is not necessarily the same name as the card or bank account holder name. |
userId |
string | The user Id from the application that represents the user that owns this payment method. | |
emailAddress |
string | The email address of the user. | |
customerId |
string | The customer identifier for the entity making the payment. | |
orderId |
string | The unique order identifier for this transaction. | |
tokenId |
string | The token identifier for a previously saved payment method. If this is supplied, the other payment options can be left as null. | |
ach |
Ach | ||
acss |
Acss | ||
auDirectDebit |
AuDirectDebit | ||
bacs |
Bacs | ||
card |
Card | ||
check |
Check | ||
nzDirectDebit |
NzDirectDebit | ||
sepa |
Sepa | ||
processorToken |
ProcessorToken | ||
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the payment record. | |
billingAddress |
Address | ||
shippingAddress |
Address | ||
amount |
number | yes | The total amount being paid. This is inclusive of the payer fee, if any. |
payerFee |
number | yes | The amount the payer is being charged to initiate this transaction. This should only be a non-zero amount when you are charging the payer a fee (e.g. a convenience fee or surcharge). |
platformFee |
number | The amount the platform is charging the account for this transaction. If left null, the fee will be calculated automatically based on the fee settings on the account. This is only used as an override to that calculation. Only the platform can set this fee. | |
splits |
array of SplitRequest | The collection of splits representing all the accounts and amounts that each should receive as a portion of the total payment amount. | |
shippingAmount |
number | The amount charged for shipping, if any. | |
taxAmount |
number | The amount charged for tax, if any. | |
lineItems |
array of TransactionLineItem | Line items needed for Level 2/3 qualification. | |
paidCustomers |
array of TransactionPaidCustomer | The list of customers tied to this transaction. | |
paidInvoices |
array of TransactionPaidInvoice | The list of paid invoices on this transaction. | |
currency |
Currency | ||
comments |
string | Additional comments entered in by the payer. | |
ipAddress |
string | The IP address of the payer. | |
browserInformation |
BrowserInformation | ||
returnUrl |
string | The return URL to be used if an authorization flow is supported by the integrating application (e.g. 3DS). | |
sendPayerReceipt |
boolean | If true, the payer will receive e-receipts on this transaction and any related returns, refunds, or voids. This value will be overridden by the setting at the account left if it is null. |
Ach
| Field | Type | Required | Description |
|---|---|---|---|
bankAccountHolder |
string | yes | The name of the bank account holder. |
routingNumber |
string | yes | The 9 digit routing number. |
bankAccountType |
BankAccountType | ||
accountNumber |
string | yes | The full account number. |
BankAccountType values: PersonalSavings, PersonalChecking, CorporateSavings, CorporateChecking.
Acss
| Field | Type | Required | Description |
|---|---|---|---|
accountHolder |
string | yes | The name of the account holder. |
bankAccountType |
BankAccountType | ||
institutionNumber |
string | yes | The 3 digit institution number. |
transitNumber |
string | yes | The 5 digit transit number. |
accountNumber |
string | yes | The full account number. |
AuDirectDebit
| Field | Type | Required | Description |
|---|---|---|---|
bankAccountHolder |
string | yes | The name of the account holder. |
bsb |
string | yes | The BSB |
accountNumber |
string | yes | The full account number. |
Bacs
| Field | Type | Required | Description |
|---|---|---|---|
bankAccountHolder |
string | yes | The name of the account holder. |
sortCode |
string | yes | The sort code. |
accountNumber |
string | yes | The full account number. |
Card
| Field | Type | Required | Description |
|---|---|---|---|
cardHolder |
string | yes | The name of the card holder. |
cardNumber |
string | yes | The card number. |
cardBrand |
CardBrand | ||
expirationMonth |
integer | yes | The expiration month. |
expirationYear |
integer | yes | The two or four digit expiration year. |
securityCode |
string | The CVV/security code for the card. |
CardBrand values: Visa, Mastercard, AmericanExpress, Discover, DinersClub.
Check
| Field | Type | Required | Description |
|---|---|---|---|
checkNumber |
string | The check number. | |
routingNumber |
string | The 9 digit routing number. | |
accountNumber |
string | The full account number. | |
fileIds |
array of string | yes | The file Ids that were used for validation. |
NzDirectDebit
| Field | Type | Required | Description |
|---|---|---|---|
bankAccountHolder |
string | yes | The name of the bank account holder. |
bankCode |
string | yes | The bank code. |
branchCode |
string | yes | The branch code. |
suffix |
string | yes | The suffix. |
accountNumber |
string | yes | The full account number. |
Sepa
| Field | Type | Required | Description |
|---|---|---|---|
accountHolder |
string | yes | The name of the account holder. |
iban |
string | yes | The IBAN number for the account. |
ProcessorToken
| Field | Type | Required | Description |
|---|---|---|---|
customerId |
string | The processor's customer identifier. | |
tokenId |
string | yes | The processor's token identifier. |
paymentMethodType |
PaymentMethodType | yes | |
cardBrand |
CardBrand | ||
maskedAccountNumber |
string | yes | The masked account number. |
PaymentMethodType values: Card, ACH, ACSS, Check, AuDirectDebit, NzDirectDebit, BACS, SEPA, CustomerInitiatedEntry.
Address
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | The name at the address | |
streetAddress |
string | The street address including the street and unit number. | |
city |
string | The city of the address. | |
stateOrProvince |
string | The abbreviated state or province of the address. | |
postalCode |
string | The postal code of the address. | |
country |
string | The two character country code. | |
phoneNumber |
string | The phone number. |
SplitRequest
| Field | Type | Required | Description |
|---|---|---|---|
accountKey |
string | yes | The key for the account that should receive the split. |
amount |
number | yes | The amount to be split to the account. |
TransactionLineItem
| Field | Type | Required | Description |
|---|---|---|---|
productCode |
string | The code for the product. | |
productDescription |
string | The description for the product. | |
unitPrice |
number | The price per unit. | |
quantity |
integer | The number of units sold. | |
taxAmount |
number | The total tax amount for this one line item. | |
discountAmount |
number | The total discount amount for this one line item. | |
unitOfMeasure |
string | The unit of measure. | |
commodityCode |
string | The commodity code for this product as defined by https://www.unspsc.org/. |
TransactionPaidCustomer
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the customer. |
name |
string | yes | The name of the customer. |
amount |
number | yes | The amount paid for this customer. |
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the customer. |
TransactionPaidInvoice
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the invoice. |
customerId |
string | The name of the customer. | |
amount |
number | yes | The amount paid for this invoice. |
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the invoice. |
Currency values: USD, CAD, EUR, AUD, GBP, NZD, DKK, NOK, SEK, CHF.
BrowserInformation
| Field | Type | Required | Description |
|---|---|---|---|
userAgent |
string | The User-Agent request header value. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 201 | The response represents the newly created transaction. Any error, if any, will be in the error message property. | GetTransactionResponse |
| 400 | The payment was not created successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
| 403 | The account is not active (problem details with the localized message), including on a repeat of a request made with the same Idempotency-Key while it was active; or the credential lacks the permission, or the account's processor configuration cannot pay the requested splits (empty body). | ValidationProblemDetails |
| 409 | A request with the supplied Idempotency-Key is already being processed, or its outcome is not yet known. Retry later with the same key. | ProblemDetails |
| 422 | The supplied Idempotency-Key was already used for a different request payload. | ProblemDetails |
| 503 | Idempotency processing is temporarily unavailable; the request was not processed. Retry later with the same Idempotency-Key. | ProblemDetails |
POST /v1/transactions/payout
Attempts to initiate a payout to a recipient's bank account.
Supply the optional Idempotency-Key header to make this call safely retryable. Repeating the request with the same key and the same payload returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true, instead of creating a second transaction. If the paying account has become inactive since, the repeat is refused with the same 403 as any other request from an inactive account, and the transaction is returned again once it is active.
| Parameter | In | Required | Description |
|---|---|---|---|
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. | |
Idempotency-Key |
header | Optional. An opaque, caller-generated key (a UUID is recommended) of up to 200 characters that makes this request safely retryable. Keys are scoped to the acting account and are never reused across accounts. Retrying with the same key and the same request does not create a second transaction: it returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true. Reusing the key with a different request returns 422, and retrying while the original request is still being processed returns 409. If idempotency processing is temporarily unavailable the request is not processed and 503 is returned; retry later with the same key. Keys are retained for 7 days after the original request's outcome is known; after that the same key is treated as new. Omitting the header leaves the request's behaviour unchanged. |
Request body: PostPayoutRequest.
PostPayoutRequest
| Field | Type | Required | Description |
|---|---|---|---|
payee |
string | The name of the payee receiving the payout. This is not necessarily the same name as the bank account holder name. | |
emailAddress |
string | The email address of the recipient. | |
tokenId |
string | The token identifier for a previously saved bank account. If this is supplied, the ACH details can be left as null. | |
ach |
Ach | ||
payeeAccountKey |
string | The account key of an in-system payee (AB#2418). When supplied, the payout is sent to that account's deposit bank without requiring dhango.Models.Api.PostPayoutRequest.TokenId or dhango.Models.Api.PostPayoutRequest.Ach details, the payee name is taken definitively from the resolved account (supplying dhango.Models.Api.PostPayoutRequest.Payee alongside this is not allowed, they are mutually exclusive), and both the payer and payee account ids are recorded on the transaction. The payee must be active and on the same platform as the payer. | |
amount |
number | yes | The amount to be paid out. This is always a positive amount; the resulting transaction is recorded as a negative amount. |
platformFee |
number | The amount the platform is charging the account for this payout. If left null, the fee will be calculated automatically based on the fee settings on the account. This is only used as an override to that calculation. Only the platform can set this fee. | |
currency |
Currency | ||
comments |
string | Additional comments tied to the payout. | |
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the payout record. | |
paidInvoices |
array of TransactionPaidInvoice | The list of paid invoices on this payout. | |
sendReceipt |
boolean | If true, the recipient will receive an e-receipt for this payout. This value will be overridden by the setting on the account if it is null. |
Ach
| Field | Type | Required | Description |
|---|---|---|---|
bankAccountHolder |
string | yes | The name of the bank account holder. |
routingNumber |
string | yes | The 9 digit routing number. |
bankAccountType |
BankAccountType | ||
accountNumber |
string | yes | The full account number. |
BankAccountType values: PersonalSavings, PersonalChecking, CorporateSavings, CorporateChecking.
Currency values: USD, CAD, EUR, AUD, GBP, NZD, DKK, NOK, SEK, CHF.
TransactionPaidInvoice
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the invoice. |
customerId |
string | The name of the customer. | |
amount |
number | yes | The amount paid for this invoice. |
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the invoice. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 201 | The response represents the newly created transaction. Any error, if any, will be in the error message property. | GetTransactionResponse |
| 400 | The payout was not created successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
| 403 | The paying account is not active (problem details with the localized message), including on a repeat of a request made with the same Idempotency-Key while it was active, or the credential lacks the permission (empty body). | ValidationProblemDetails |
| 409 | A request with the supplied Idempotency-Key is already being processed, or its outcome is not yet known. Retry later with the same key. | ProblemDetails |
| 422 | The supplied Idempotency-Key was already used for a different request payload. | ProblemDetails |
| 503 | Idempotency processing is temporarily unavailable; the request was not processed. Retry later with the same Idempotency-Key. | ProblemDetails |
POST /v1/transactions/authorize
Attempts to authorize a payment using on a card.
Supply the optional Idempotency-Key header to make this call safely retryable. Repeating the request with the same key and the same payload returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true, instead of creating a second transaction. If the account has become inactive since, the repeat is refused with the same 403 as any other request from an inactive account, and the transaction is returned again once it is active.
| Parameter | In | Required | Description |
|---|---|---|---|
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. | |
Idempotency-Key |
header | Optional. An opaque, caller-generated key (a UUID is recommended) of up to 200 characters that makes this request safely retryable. Keys are scoped to the acting account and are never reused across accounts. Retrying with the same key and the same request does not create a second transaction: it returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true. Reusing the key with a different request returns 422, and retrying while the original request is still being processed returns 409. If idempotency processing is temporarily unavailable the request is not processed and 503 is returned; retry later with the same key. Keys are retained for 7 days after the original request's outcome is known; after that the same key is treated as new. Omitting the header leaves the request's behaviour unchanged. |
Request body: PostAuthorizeRequest.
PostAuthorizeRequest
| Field | Type | Required | Description |
|---|---|---|---|
payer |
string | yes | The name of the payer. This is not necessarily the same name as the card or bank account holder name. |
userId |
string | The user Id from the application that represents the user that owns this payment method. | |
emailAddress |
string | The email address of the user. | |
customerId |
string | The customer identifier for the entity making the payment. | |
orderId |
string | The unique order identifier for this transaction. | |
tokenId |
string | The token identifier for a previously saved payment method. If this is supplied, the other payment options can be left as null. | |
card |
Card | ||
processorToken |
ProcessorToken | ||
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the payment record. | |
billingAddress |
Address | ||
shippingAddress |
Address | ||
amount |
number | yes | The total amount being paid. This is inclusive of the payer fee, if any. |
shippingAmount |
number | The amount charged for shipping, if any. | |
taxAmount |
number | The amount charged for tax, if any. | |
lineItems |
array of TransactionLineItem | Line items needed for Level 2/3 qualification. | |
paidCustomers |
array of TransactionPaidCustomer | The list of customers tied to this transaction. | |
paidInvoices |
array of TransactionPaidInvoice | The list of paid invoices on this transaction. | |
splits |
array of SplitRequest | The collection of splits representing additional accounts that should receive a portion of the amount. Supplied at authorization time so the charge is created on the correct model (Separate Charges and Transfers, on_behalf_of, no transfer_data, when splits are present); the actual split fan-out happens at capture. The presence of splits here must match capture. | |
currency |
Currency | ||
comments |
string | Additional comments entered in by the payer. | |
ipAddress |
string | The IP address of the payer. | |
browserInformation |
BrowserInformation | ||
returnUrl |
string | The return URL to be used if an authorization flow is supported by the integrating application (e.g. 3DS). | |
sendPayerReceipt |
boolean | If true, the payer will receive e-receipts on this transaction and any related returns, refunds, or voids. This value will be overridden by the setting at the account left if it is null. |
Card
| Field | Type | Required | Description |
|---|---|---|---|
cardHolder |
string | yes | The name of the card holder. |
cardNumber |
string | yes | The card number. |
cardBrand |
CardBrand | ||
expirationMonth |
integer | yes | The expiration month. |
expirationYear |
integer | yes | The two or four digit expiration year. |
securityCode |
string | The CVV/security code for the card. |
CardBrand values: Visa, Mastercard, AmericanExpress, Discover, DinersClub.
ProcessorToken
| Field | Type | Required | Description |
|---|---|---|---|
customerId |
string | The processor's customer identifier. | |
tokenId |
string | yes | The processor's token identifier. |
paymentMethodType |
PaymentMethodType | yes | |
cardBrand |
CardBrand | ||
maskedAccountNumber |
string | yes | The masked account number. |
PaymentMethodType values: Card, ACH, ACSS, Check, AuDirectDebit, NzDirectDebit, BACS, SEPA, CustomerInitiatedEntry.
Address
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | The name at the address | |
streetAddress |
string | The street address including the street and unit number. | |
city |
string | The city of the address. | |
stateOrProvince |
string | The abbreviated state or province of the address. | |
postalCode |
string | The postal code of the address. | |
country |
string | The two character country code. | |
phoneNumber |
string | The phone number. |
TransactionLineItem
| Field | Type | Required | Description |
|---|---|---|---|
productCode |
string | The code for the product. | |
productDescription |
string | The description for the product. | |
unitPrice |
number | The price per unit. | |
quantity |
integer | The number of units sold. | |
taxAmount |
number | The total tax amount for this one line item. | |
discountAmount |
number | The total discount amount for this one line item. | |
unitOfMeasure |
string | The unit of measure. | |
commodityCode |
string | The commodity code for this product as defined by https://www.unspsc.org/. |
TransactionPaidCustomer
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the customer. |
name |
string | yes | The name of the customer. |
amount |
number | yes | The amount paid for this customer. |
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the customer. |
TransactionPaidInvoice
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the invoice. |
customerId |
string | The name of the customer. | |
amount |
number | yes | The amount paid for this invoice. |
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the invoice. |
SplitRequest
| Field | Type | Required | Description |
|---|---|---|---|
accountKey |
string | yes | The key for the account that should receive the split. |
amount |
number | yes | The amount to be split to the account. |
Currency values: USD, CAD, EUR, AUD, GBP, NZD, DKK, NOK, SEK, CHF.
BrowserInformation
| Field | Type | Required | Description |
|---|---|---|---|
userAgent |
string | The User-Agent request header value. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 201 | The response represents the newly created transaction. Any error, if any, will be in the error message property. | GetTransactionResponse |
| 400 | The authorization was not created successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
| 403 | The account is not active (problem details with the localized message), including on a repeat of a request made with the same Idempotency-Key while it was active; or the credential lacks the permission, or the account's processor configuration cannot pay the requested splits (empty body). | ValidationProblemDetails |
| 409 | A request with the supplied Idempotency-Key is already being processed, or its outcome is not yet known. Retry later with the same key. | ProblemDetails |
| 422 | The supplied Idempotency-Key was already used for a different request payload. | ProblemDetails |
| 503 | Idempotency processing is temporarily unavailable; the request was not processed. Retry later with the same Idempotency-Key. | ProblemDetails |
POST /v1/transactions/{id}/capture
Attempts to capture a payment from a previously authorized transaction.
Supply the optional Idempotency-Key header to make this call safely retryable. Repeating the request with the same key and the same payload returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true, instead of creating a second transaction.
| Parameter | In | Required | Description |
|---|---|---|---|
id |
path | yes | The identifier of the previously authorized transaction. |
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. | |
Idempotency-Key |
header | Optional. An opaque, caller-generated key (a UUID is recommended) of up to 200 characters that makes this request safely retryable. Keys are scoped to the acting account and are never reused across accounts. Retrying with the same key and the same request does not create a second transaction: it returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true. Reusing the key with a different request returns 422, and retrying while the original request is still being processed returns 409. If idempotency processing is temporarily unavailable the request is not processed and 503 is returned; retry later with the same key. Keys are retained for 7 days after the original request's outcome is known; after that the same key is treated as new. Omitting the header leaves the request's behaviour unchanged. |
Request body: PostCaptureRequest.
PostCaptureRequest
| Field | Type | Required | Description |
|---|---|---|---|
amount |
number | The amount of the previously authorized transaction that is being captured. | |
payerFee |
number | yes | The amount the payer is being charged to initiate this transaction. This should only be a non-zero amount when you are charging the payer a fee (e.g. a convenience fee or surcharge). |
platformFee |
number | The amount the platform is charging the account for this transaction. If left null, the fee will be calculated automatically based on the fee settings on the account. This is only used as an override to that calculation. Only the platform can set this fee. | |
splits |
array of SplitRequest | The collection of splits representing additional accounts that should receive a portion of the amount. | |
shippingAmount |
number | The amount charged for shipping, if any. | |
taxAmount |
number | The amount charged for tax, if any. | |
lineItems |
array of TransactionLineItem | Line items needed for Level 2/3 qualification. | |
paidCustomers |
array of TransactionPaidCustomer | The list of customers tied to this transaction. | |
paidInvoices |
array of TransactionPaidInvoice | The list of paid invoices on this transaction. |
SplitRequest
| Field | Type | Required | Description |
|---|---|---|---|
accountKey |
string | yes | The key for the account that should receive the split. |
amount |
number | yes | The amount to be split to the account. |
TransactionLineItem
| Field | Type | Required | Description |
|---|---|---|---|
productCode |
string | The code for the product. | |
productDescription |
string | The description for the product. | |
unitPrice |
number | The price per unit. | |
quantity |
integer | The number of units sold. | |
taxAmount |
number | The total tax amount for this one line item. | |
discountAmount |
number | The total discount amount for this one line item. | |
unitOfMeasure |
string | The unit of measure. | |
commodityCode |
string | The commodity code for this product as defined by https://www.unspsc.org/. |
TransactionPaidCustomer
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the customer. |
name |
string | yes | The name of the customer. |
amount |
number | yes | The amount paid for this customer. |
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the customer. |
TransactionPaidInvoice
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the invoice. |
customerId |
string | The name of the customer. | |
amount |
number | yes | The amount paid for this invoice. |
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the invoice. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 201 | The response represents the newly created transaction. Any error, if any, will be in the error message property. | GetTransactionResponse |
| 400 | The capture transaction was not created successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
| 403 | The credential lacks the permission, or the account's processor configuration cannot pay the requested splits (empty body). | |
| 409 | A request with the supplied Idempotency-Key is already being processed, or its outcome is not yet known. Retry later with the same key. | ProblemDetails |
| 422 | The supplied Idempotency-Key was already used for a different request payload. | ProblemDetails |
| 503 | Idempotency processing is temporarily unavailable; the request was not processed. Retry later with the same Idempotency-Key. | ProblemDetails |
POST /v1/transactions/{id}/void
Attempts to void a payment. Note that voiding is only allowed on new transactions where the movement of funds has not yet occurred.
| Parameter | In | Required | Description |
|---|---|---|---|
id |
path | yes | The identifier of the transaction. |
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 200 | The transaction was voided created successfully. | |
| 400 | The transaction was not voided successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
POST /v1/transactions/{id}/refund
Attempts to refund a successful payment.
Supply the optional Idempotency-Key header to make this call safely retryable. Repeating the request with the same key and the same payload returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true, instead of creating a second transaction. A refund the processor declined is answered again with the same 400 it first received.
| Parameter | In | Required | Description |
|---|---|---|---|
id |
path | yes | The identifier of the transaction to be refunded. |
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. | |
Idempotency-Key |
header | Optional. An opaque, caller-generated key (a UUID is recommended) of up to 200 characters that makes this request safely retryable. Keys are scoped to the acting account and are never reused across accounts. Retrying with the same key and the same request does not create a second transaction: it returns the transaction this key originally created, in its current state, and sets the Idempotent-Replayed response header to true. Reusing the key with a different request returns 422, and retrying while the original request is still being processed returns 409. If idempotency processing is temporarily unavailable the request is not processed and 503 is returned; retry later with the same key. Keys are retained for 7 days after the original request's outcome is known; after that the same key is treated as new. Omitting the header leaves the request's behaviour unchanged. |
Request body: PostRefundRequest.
PostRefundRequest
| Field | Type | Required | Description |
|---|---|---|---|
amount |
number | The amount to be refunded. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 201 | The response represents the newly created transaction. Any error, if any, will be in the error message property. | GetTransactionResponse |
| 400 | The refund transaction was not created successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
| 409 | A request with the supplied Idempotency-Key is already being processed, or its outcome is not yet known. Retry later with the same key. | ProblemDetails |
| 422 | The supplied Idempotency-Key was already used for a different request payload. | ProblemDetails |
| 503 | Idempotency processing is temporarily unavailable; the request was not processed. Retry later with the same Idempotency-Key. | ProblemDetails |
PATCH /v1/transactions/{id}/metadata
Upserts metadata values. This is only allowed for a limited time after the initial creation of the transaction record.
| Parameter | In | Required | Description |
|---|---|---|---|
id |
path | yes | The identifier of the transaction to be updated. |
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. |
This operation sends a request body.
Responses:
| Status | Description | Schema |
|---|---|---|
| 200 | The response represents the newly updated transaction. | GetTransactionResponseSearchResults |
| 400 | The transaction was not updated successfully. Error messages can be found in the body of the response. |