Approve payout
Payouts
Our payout service allows you to easily transfer money directly, either to a card or into a bank account of your choice.
Request
Approve a created, unprocessed, payout resource. This is the second half of the two-step payout flow, where first you create a payout and review it before instructing us to process the payout. Approving the payout instructs us to process the submitted payout.
PayloadApprovePayoutRequest
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
datePayout | string (8) | no | read close |
close
DescriptionThe desired date for the payout
Format: YYYYMMDD |
|||
Property | Type | Required | Details |
Request example
This scenario you will probably use the most
-
var body = { "datePayout" : "20150102" }; const sdkResponse = await client.v1.payouts.approve("merchantId", "payoutId", body); // sdkResponse has the following properties: // - status: the HTTP status code // - body: the response body // - isSuccess: true if the call was successful, // or false if the Worldline Global Collect platform returned an error response
Responses
Please find below an overview of the possible responses.
Response 200 - OKPayoutResponse
For every successfully approved payout a HTTP 200 response is returned.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
id | string | no | read close |
close
DescriptionOur unique payout transaction identifier.
|
|||
object | no | read close | |
close
DescriptionObject containing amount and ISO currency code attributes
|
|||
close
DescriptionAmount in cents and always having 2 decimals
|
|||
close
DescriptionThree-letter ISO currency code representing the currency for the amount
|
|||
close
DescriptionObject that holds all reference properties that are linked to this transaction
|
|||
close
DescriptionYour order ID for this transaction that is also returned in our report files
|
|||
close
DescriptionYour unique reference of the transaction that is also returned in our report files. This is almost always used for your reconciliation of our report files.
|
|||
close
DescriptionPayment Reference generated by WebCollect
|
|||
close
DescriptionProvides an additional means of reconciliation for Gateway merchants
|
|||
close
DescriptionProvides an additional means of reconciliation, this is the MerchantId used at the provider
|
|||
close
DescriptionProvides an additional means of reconciliation for Gateway merchants
|
|||
close
DescriptionWhen you did not supply a merchantReference for your payment, you need to fill this property with the reference of the original payment when you want to refund it
|
|||
status | enum | no | read close |
close
DescriptionCurrent high-level status of the payouts in a human-readable form. Possible values are :
Please see Statuses for a full overview of possible values. |
|||
object | no | read close | |
close
DescriptionThis object has the numeric representation of the current payout status, timestamp of last status change and performable action on the current payout resource.
In case of a rejected payout, detailed error information is listed.
|
|||
close
DescriptionCustom object contains the set of errors
|
|||
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
close
DescriptionError code
|
|||
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
close
DescriptionReturned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query. Some common examples:
|
|||
close
DescriptionID of the request that can be used for debugging purposes
|
|||
close
DescriptionFlag indicating if the payment can be cancelled
|
|||
close
DescriptionFlag indicating whether a rejected payment may be retried by the merchant without incurring a fee
|
|||
close
DescriptionThis is the raw response returned by the acquirer. This property contains unprocessed data directly returned by the acquirer. It's recommended for data analysis only due to its dynamic nature, which may undergo future changes.
|
|||
close
DescriptionName of the key or property
|
|||
close
DescriptionValue of the key or property
|
|||
close
DescriptionHighlevel status of the payment, payout or refund with the following possible values:
Please see Statuses for a full overview of possible values. |
|||
close
DescriptionNumeric status code of the legacy API. It is returned to ease the migration from the legacy APIs to Worldline Connect. You should not write new business logic based on this property as it will be deprecated in a future version of the API. The value can also be found in the GlobalCollect Payment Console, in the Ogone BackOffice and in report files.
|
|||
close
DescriptionDate and time of payment
Format: YYYYMMDDHH24MISS |
|||
Property | Type | Required | Details |
Response example
This scenario you will probably use the most
-
{ "id" : "00000088970012412214000-100001", "payoutOutput" : { "amountOfMoney" : { "amount" : 2345, "currencyCode" : "EUR" }, "references" : { "paymentReference" : "0", "merchantReference" : "AcmeOrder0001" } }, "status" : "PAYOUT_REQUESTED", "statusOutput" : { "isCancellable" : true, "statusCode" : 800, "statusCodeChangeDateTime" : "20140707093103" } }
Response 400 - Bad requestErrorResponse
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
errorId | string | yes | read close |
close
DescriptionUnique reference, for debugging purposes, of this error response
|
|||
array of object | yes | read close | |
close
DescriptionList of one or more errors
|
|||
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
close
DescriptionError code
|
|||
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
close
DescriptionReturned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query. Some common examples:
|
|||
close
DescriptionID of the request that can be used for debugging purposes
|
|||
Property | Type | Required | Details |
Response example
This scenario you will probably use the most
-
{ "errorId" : "15eabcd5-30b3-479b-ae03-67bb351c07e6-00000092", "errors" : [ { "code" : "20000000", "propertyName" : "bankAccountBban.accountNumber", "message" : "PARAMETER_NOT_FOUND_IN_REQUEST" } ] }
Response 402 - Payment requiredErrorResponse
If the payout approval could not be performed a HTTP status 402 can be returned.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
errorId | string | yes | read close |
close
DescriptionUnique reference, for debugging purposes, of this error response
|
|||
array of object | yes | read close | |
close
DescriptionList of one or more errors
|
|||
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
close
DescriptionError code
|
|||
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
close
DescriptionReturned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query. Some common examples:
|
|||
close
DescriptionID of the request that can be used for debugging purposes
|
|||
Property | Type | Required | Details |
Response example
This scenario you will probably use the most
-
{ "errorId" : "3caa7750-a076-48b2-9402-3cb9eea613a6-000004ad", "errors" : [ { "code" : "410110", "message" : "UNKNOWN_ORDER_OR_NOT_PENDING" } ] }