Split at authorizations and captures

Create an authorization

The following is an extension of the Authorization API documentation.

Request fields, response fields, and error codes are the same as Split at sales. The main difference is that, since it is an authorization and not a sale, we have to set the capture field as false.

Example request

To create an authorization, simply create a regular card payment with the parameter capture = FALSE within the Card object and add the Splits Object.

{
   "amount": 100.00,
   "currency": "BRL",
   "country":"BR",
   "payment_method_id":"CARD",
   "payment_method_flow":"DIRECT",
   "payer": {
       "name": "Thiago Gabriel",
       "email": "[email protected]",
       "document": "53033315550"
   },
   "card": {
       "holder_name": "Thiago Gabriel",
       "number": "4111111111111111",
       "cvv": "123",
       "expiration_month": 10,
       "expiration_year": 2040,
       "capture": "false"
   },
   "order_id":"657434343",
   "splits": [
       {
           "account_id": "AC-5678-1234-5432",
           "amount": 50
       },
       {
           "account_id": "AC-6789-3344-1122",
           "amount": 50
       }
   ]
}
{
    "id": "D-4-e2227981-8ec8-48fd-8e9a-19fedb08d73a",
    "amount": 100,
    "currency": "BRL",
    "payment_method_id": "CARD",
    "payment_method_type": "CARD",
    "payment_method_flow": "DIRECT",
    "country": "BR",
    "card": {
        "holder_name": "Thiago Gabriel",
        "expiration_month": 10,
        "expiration_year": 2040,
        "brand": "VI",
        "last4": "1111"
    },
    "created_date": "2019-02-06T21:04:43.000+0000",
    "approved_date": "2019-02-06T21:04:44.000+0000",
    "status": "AUTHORIZED",
    "status_detail": "The payment was authorized",
    "status_code": "600",
    "order_id": "657434343",
    "notification_url": "http://merchant.com/notifications"
}

Capture an authorization

The following is an extension of the Authorization API documentation.

Splits Object must be included in the request. The amount included in the Splits Object cannot be higher than the amount authorized for each account individually.

Example request

{
   "authorization_id": "PAY2323243343543",
   "amount":100.00,
   "country": "BR",
   "order_id":"657434343",
   "splits": [
       {
           "account_id": "AC-5678-1234-5432",
           "amount": 50
       },
       {
           "account_id": "AC-6789-3344-1122",
           "amount": 50
       }
   ]
}
{
    "id": "D-4-09f52dd0-5cfa-4b0e-a471-1608ea0dba24",
    "amount": 100.00,
    "currency": "BRL",
    "country": "BR",
    "created_date": "2019-02-07T13:47:06.000+0000",
    "approved_date": "2019-02-07T13:47:06.000+0000",
    "status": "PAID",
    "status_detail": "The payment was paid",
    "status_code": "200",
    "order_id": "657434343",
    "authorization_id": "PAY2323243343543"
}