Create payout

This method is used to create a payout transaction.

Request example (bank account)

POST /v1/{{API_KEY}}/payouts
Content-Type: application/json
Host: api-sandbox.bridgerpay.com
Authorization: Bearer {{ACCESS_TOKEN}}
{
"order_id": "a17331a4",
"provider": "PspName",
"country": "BE",
"currency": "EUR",
"state": null,
"amount": 2723.00,
"payout_method_type": "bank_account",
"metadata":
{
"bankCode": "AXABBE22",
"bankName": "AXA Bank Europe",
"bankBranch": "Bruxelles Trone"
"bankAddress": "Place du Trone, 1, 1000, Bruxelles, Belgium"
"bankZipcode": "12345",
"bankRoutingNumber": "123456789",
"bankAccountNumber": "12345678901234567890",
"bankAccountName": "Current account",
"phone": "+18419998877",
"customerFirstName": "John",
"customerLastName": "Smith",
"email": "[email protected]",
}
}

post
Create Payout

<URL>/v1/{{API_KEY}}/payout
This method is used to create a payout transaction.
Request
Response
Request
Path Parameters
API_KEY
required
string
Software-level credentials that identify a merchant and ensure secure access to sensitive information; provided by BridgerPay
Headers
Content-Type
required
string
Data format to present information in the response; only "application/json" is supported
Host
optional
string
Web domain identifier
Authorization
required
string
Authorization mechanism: Bearer {{ACCESS_TOKEN}}
Body Parameters
order_id
required
string
Transaction ID within the merchant's system
provider
required
string
PSP's code name or real name
country
required
string
Country where the payout transaction is to be created; designated according to ISO 3166-1 — Country Codes (e.g. "US", "CN", or "BE")
currency
required
string
Currency which the payout transaction is to be originated in; designated according to ISO 4217 — Currency Codes (e.g. "USD", "CNY", or "EUR")
state
optional
string
State where the payout transaction is to be created; applicable to the USA, Canada, and Australia
amount
required
number
Transaction amount; must be more than 0
payout_method_type
required
string
Payout method, e.g. "bank_account" or "credit_card"
metadata
required
object
Set of dynamic parameters associated with the payout method of a PSP. This set varies and might be "bankCode", "bankName", and "bankBranch" for "bank_account" or "cardNumber", "cardHolderName", and "expirationMonth" for "credit_card". You can get the exact set by using the "Get payout providers" method
Response
200: OK
Successful response
{
"response": {
"status": "OK", //Response status
"code": 200, //Response code
"message": "OK" //Comment associated with the response
},
"result": {
"payout_method": "bank_account", //Payout method
"html": null, //Not applicable
"is_decoded": false, //Not applicable
"email_instructions_enabled": null, //Redundant, will be removed
"open_in_new_window": false, //Redundant, will be removed
"id": "3c107b2c", //Transaction ID within the BridgerPay system
"transaction_id": "9d4d9cdb", //Transaction ID within the PSP's system
"amount": 2723.00, //Transaction amount
"processing_date": "2020-08-04 10:31:20", //Date and time when the transaction was processed by BridgerPay
"failure_code": null, //Not applicable
"status": "Pending", //Transaction status
"currency": "EUR", //Transaction currenty
"payment_method": "bank_account" //Redundant, will be removed
}
}
400: Bad Request
One or more required parameters are missing or have incorrect format
{
"response": {
"status": "BadRequest",
"code": 400,
"message": "400"
},
"result": [
{
"type": "validaton_error",
"field": "metadata.bankAccountName",
"message": "Value can not be empty"
},
{
"type": "validation_error",
"field": "metadata.email",
"message": "Email is invalid"
}
]
}
401: Unauthorized
1) Attempt to access the resource without authorization (empty response) 2) No API_KEY or invalid API_KEY provided to access the resource
{
"response": {
"code": 401,
"message": "merchant api key '<API_KEY>' is invalid"
}
}
415: Unsupported Media Type
Content-Type header parameter has not been provided, or the specified value is not supported by BridgerPay (empty response)

Request example (credit card)

Request
Response
Request
POST /v1/{{API_KEY}}/payouts
Content-Type: application/json
Host: api-sandbox.bridgerpay.com
Authorization: Bearer {{ACCESS_TOKEN}}
{
"order_id": "a17331a5",
"provider": "PspName",
"country": "BE",
"currency": "EUR",
"state": null,
"amount": 1440.00,
"payout_method_type": "credit_card",
"metadata":
{
"creditCardToken": "",
"creditCardNumber": "4012888888881881",
"cardHolderName": "John Smith",
"expiryMonth": 1,
"expiryYear": 2022,
"customerFirstName": "John",
"customerLastName": "Smith",
"email": "[email protected]"
}
}
Response
{
"response": {
"status": "OK",
"code": 200,
"message": "OK"
},
"result": {
"payout_method": "credit_card",
"html": null,
"is_decoded": false,
"email_instruction_enabled": null,
"open_in_new_window": false,
"id": "40877f24",
"transaction_id": "85f9daa5",
"amount": 1440.00,
"processing_date": "2020-08-20 05:44:49",
"failure_code": null,
"status": "Approved",
"currency": "EUR",
"payment_method": "credit_card"
}
}