Payments

The Payments API enables you to retrieve, and export payment's data.


GET/v2/payments/{id}

Get payment by ID

Get the information for a specific payment using its ID (amount, creation date, gateway, etc).

Required Path Parameters

    idstringrequired

Loading...

Response

  {
    "amount": "200",
    "id": "26f8f73a-e111-4036-89cc-305d99f7687c",
    "createdAt": "2024-02-28T16:11:00.575Z",
    "paymentGatewayId": "2080516431",
    "orderId": "ef9e924b-200b-49eb-92cc-43271398ee35",
    "currency": "ARS",
    "status": "SUCCEEDED",
    "card": {
      "id": "b2fefb2b-1203-4322-a411-b835f29e9f26",
      "bin": 45179,
      "last4": "0033",
      "cardNumber": "43201234678909871234",
      "cardHolder": "John doe",
      "brand": "Visa",
      "expiration": {
        "month": 11,
        "year": "2022"
      },
      "gatewayCards": {
        "month": 11,
        "year": "2022"
      }
    },
    "gateway": {
      "id": "b2fefb2b-1203-4322-a411-b835f29e9f26",
      "type": "rebill_gateway",
      "description": "string",
      "country": "AR",
      "status": [
        "PENDING",
        "ACCEPTED"
      ],
      "publicKey": "4vRnUqnJff3VuT2rdpl7vG_I56ANB1HR",
      "recurring": false,
      "crossborder": true,
      "currencies": true
    },
    "payer": {
      "id": "b2fefb2b-1203-4322-a411-b835f29e9f26",
      "type": "rebill_gateway",
      "description": "string",
      "country": "AR",
      "status": [
        "PENDING",
        "ACCEPTED"
      ],
      "publicKey": "4vRnUqnJff3VuT2rdpl7vG_I56ANB1HR",
      "recurring": false,
      "crossborder": true,
      "currencies": true
    },
    "description": "Monthly gym membership x1",
    "errorMessage": "Insufficient funds",
    "refundMetadata": "string",
    "billingSchedulesId": [
      "70457f14-5576-4c68-8330-fac806ea25c2",
      "34446301-3d4b-4ef4-9741-6ac96c76d4e3"
    ],
    "paymentMethod": "CASH",
    "metadataObject": {
      "someProperty": "some value"
    },
    "installments": "12",
    "fee": "0,1",
    "netValue": "99",
    "exchangeRate": "0,05"
  }

GET/v2/payments/{id}/prices

Get price by payment ID

Obtain the price ID associated with a payment by payment ID.

Required Path Parameters

    idstringrequired

Loading...

Response

  {
    "priceIds": [
      "priceid_f2dncb637wjfndiwu4bfjsi",
      "priceid2_d89r4ihn-2mdnv854nwpfu",
      // more prices...
    ]
  }

GET/v2/payments

Get organization's payments

Access all of your organization's payments.

Required Path Parameters

    idstringrequired

Optional Query Parameters

    statusstring
    orderstring
    searchstring
    pagestring
    takejson

Loading...

Response

  {
    "data": [
        {
            "id": "sample-id1-3803f409-1bde-4c97",
            "amount": "2000",
            "currency": "ARS",
            "errorMessage": null,
            "status": "SUCCEEDED",
            "brand": "Visa",
            "paymentId": "example-payment-1272760",
            "card": {
                "id": "card-sample-id1-287c8f41-bb54",
                "bin": "123456",
                "brand": "Visa",
                "last4": "1234",
                "cardHolder": "ALEX CUSTOMER",
                "cardNumber": "123456******1234",
                "expiration": {
                    "month": 12,
                    "year": "2030"
                }
            },
            "payer": {
                "email": "alex@example.com",
                "firstName": "Alex",
                "lastName": "Customer"
            },
            "createdAt": "2024-01-27T18:45:04.072Z",
            "description": "Service Subscription x 1",
            "paymentMethod": {
                "type": "CARD",
                "metadata": {
                    "name": "CARD",
                    "formalName": "Credit Card"
                }
            },
            "gateway": {
                "id": "sample-gateway-id1-1b73dcb5-630a",
                "type": "rebill_gateway",
                "country": "AR",
                "description": "Rebill Gateway | Crossborder"
            },
            "metadataObject": {
                "finalAmount": 200000
            }
        },
        // more payments...
      ],
      "meta": {
          "page": 1,
          "take": 2,
          "itemCount": 20,
          "pageCount": 10,
          "hasPreviousPage": false,
          "hasNextPage": true
      }
  }


POST/v2/payments/{email}/export/csv

Export payments to CSV

Export your organization's payments in CSV format.

Required Path Parameters

    emailstringrequired

Required Body Parameters

    clientTimeZonestringrequired
    fromDatestringrequired
    toDatestringrequired

Loading...

Response

  {

  }

Was this page helpful?