Saltar al contenido principal

Debi API (2022-08-01)

Download OpenAPI specification:Download

Introduction

Debi (formerly TuCuota) serves a REST API. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

The base URLs for the Debi API are:

Content types

Debi API supports only JSON content types. Make sure to include the following header on your requests.

Content-Type Header

Content-Type: "application/json"

Authentication

The API is only available over HTTPS. Attempting to access the API over an unsecured HTTP connection will return a tls_required error.

Get an API key

To create new API keys, please visit the developers section of our site.

For each environment (live and test) yo'll find two types of API Keys:

  • Publishable (pk_...): can be publicly-accessible in your web client-side code to tokenize payment information.
  • Secret (sk_...): To be used on the server-side. Must be secret and stored securely in your application's code to call Debi APIs.

To authenticate you must provide the API key in an Authorization request header (using the Bearer authentication scheme) when making API requests.

Example Authentication Header

Authorization: Bearer sk_live_...

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Errors

This API uses HTTP status codes to communicate with the API consumer.

  • 200 OK - Response to a successful GET, PUT, PATCH or DELETE.
  • 201 Created - Response to a POST that results in a creation.
  • 204 No Content - Response to a successful request that won't be returning a body (like a DELETE request).
  • 400 Bad Request - Malformed request.
  • 401 Unauthorized - When no or invalid authentication details are provided.
  • 403 Forbidden - When authentication succeeded but authenticated user doesn't have access to the resource.
  • 404 Not Found - When a non-existent resource is requested.
  • 405 Method Not Allowed - Method not allowed.
  • 406 Not Acceptable - Could not satisfy the request Accept header.
  • 415 Unsupported Media Type - Unsupported media type in request.
  • 422 Unprocessable Entity - Form validation errors.

Error response

This API returns both, machine-readable error codes and human-readable error messages when there's an error.

Example
Validation Error
{
  "message": "The given data was invalid.",
  "errors": {
    "organization_name": ["El campo debe tener algún valor."],
    "mobile_number": ["El campo debe tener algún valor."],
    "province": ["El campo debe tener algún valor."],
    "locality": ["El campo debe tener algún valor."],
    "address": ["El campo debe tener algún valor."]
  }
}
Generic Error
{
  "message": "Unauthenticated."
}

Idempotent Requests

The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. For example, if a request to create a payment does not respond due to a network connection error, you can retry the request with the same idempotency key to guarantee that no more than one charge is created.

To perform an idempotent request, provide an additional Idempotency-Key: <key> header to the request.

Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors.

An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions.

Keys are eligible to be removed from the system after they're at least 24 hours old, and a new request is generated if a key is reused after the original has been pruned. The idempotency layer compares incoming parameters to those of the original request and errors unless they're the same to prevent accidental misuse.

Results are only saved if an API endpoint started executing. If incoming parameters failed validation, or the request conflicted with another that was executing concurrently, no idempotent result is saved because no API endpoint began execution. It is safe to retry these requests.

All POST requests accept idempotency keys. Sending idempotency keys in GET and DELETE requests has no effect and should be avoided, as these requests are idempotent by definition.

Metadata

The following objects have a metadata parameter that you can use this parameter to attach key-value data:

Metadata is useful for storing additional, structured information on an object.

Do not store any sensitive information (bank account numbers, card details, etc.) as metadata.

Pagination

All top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list payments, list customers, and list subscriptions. These list API methods share a common structure, taking at least these three parameters: limit, starting_after, and ending_before.

The response of a list API method represents a single page in a reverse chronological stream of objects. If you do not specify starting_after or ending_before, you will receive the first page of this stream, containing the newest objects. You can specify starting_after equal to the object ID value of an item to retrieve the page of older objects occurring immediately after the named object in the reverse chronological stream. Similarly, you can specify ending_before to receive a page of newer objects occurring immediately before the named object in the stream. Objects in a page always appear in reverse chronological order. Only one of starting_after or ending_before may be used.

Request IDs

Each API request has an associated request identifier. You can find this value in the response headers, under Request-Id. You can also find request identifiers in the URLs of individual request logs in your Dashboard.

Conventions

Notational Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC2119.

HTTP Methods

This API uses HTTP verbs (methods) as following:

  • GET - Read - used to read (or retrieve) a representation of a resource,
  • POST - Create - used to create new resources. In particular, it's used to create subordinate resources.
  • PUT - Update/Replace - used for update capabilities, PUT-ing to a known resource URI with the request body containing the newly-updated representation of the original resource. On successful request, replaces identified resource with the request body.
  • PATCH - Update/Modify - used for modify capabilities. The PATCH request only needs to contain the changes to the resource, not the complete resource.
  • DELETE - Delete - used to delete a resource identified by a URI.

Representation of Date and Time

All exchange of date and time-related data MUST be done according to RFC339 standard.

Versioning

This API uses Api-Version header to identify requested version. Every minor version SHOULD be backward compatible. However, major versions MAY introduce breaking changes.

Api-Version:

This header SHOULD be present in every request. If not, API MUST use the newest available major release.

If requested version is not available, API SHOULD try to fall back to the next available minor release.

When backwards-incompatible changes are made to the API, a new, dated version is released. The current version of the API is 2022-02-14.

Resource IDs

This API uses short non-sequential url-friendly unique ids. Every resource id MUST consists of 12 url-friendly characters: A-Z, a-z, 0-9, _ and -.

Example

PY6b3Rr6nRMo

Testing Card and account numbers

In sandbox mode the following test cards and CBUs can be used to create payments that produce specific responses useful for testing different scenarios.

Number Type Status Network Funding
4242424242424242 card approved visa credit
4000056655665556 card approved visa debit
4507990000004905 card approved visa credit
5555555555554444 card approved mastercard credit
5896570000000008 card approved mastercard credit
2223003122003222 card approved mastercard credit
5200828282828210 card approved mastercard debit
5105105105105100 card approved mastercard prepaid
6042451111111117 card approved discover credit
6011111111111117 card approved discover credit
6011000990139424 card approved discover credit
6011981111111113 card approved discover debit
5299910010000015 card approved discover credit
3056930009020004 card approved diners credit
36227206271667 card approved diners credit
3566002020360505 card approved jcb credit
378282246310005 card approved amex credit
371449635398431 card approved amex credit
4000000000005126 card submitted visa credit
4000000000003220 card submitted visa credit
5895622082273045 card approved naranja credit
5895622082273044 card rejected naranja credit
2859363672283668188432 cbu approved
3220001823000055910025 cbu approved
8258975011100070754947 cbu rejected
1212000002283668188432 cbu rejected
4000000000000002 card rejected visa credit
4338308001478538 card rejected visa credit
4000000000009995 card rejected visa credit
4000000000009987 card rejected visa credit
4000000000009979 card rejected visa credit
371449635398432 card rejected amex credit

Webhook Notifications

Webhooks are endpoints you can configure to be notified about events that happen in your Debi account. Most users configure Webhooks from the dashboard, which provides a user interface for registering and testing your webhook endpoints.

Example webhook:
{
  "id": "EVPYeJeyeJ7r",
  "created_at": "2019-05-23T20:18:28-0300",
  "data": {
    "object": {
      "id": "CS9PL8eeo8aB",
      "paid": false,
      "amount": 1600,
      "status": "pending_submission",
      "gateway": "GWd1e9nQwK7v",
      "currency": "ARS",
      "customer": {
        "id": "CS9PL8eeo8aB",
        "name": "Máximo Irizarry",
        "email": "mirrizarry@paez.com",
        "livemode": true,
        "metadata": { "key": "value" },
        "created_at": "2018-05-01T11:45:14-0300",
        "updated_at": "2018-05-01T11:45:14-0300",
        "gateway_identifier": "001234",
        "mobile_number": "+5493812596655",
        "identification_type": "",
        "identification_number": ""
      },
      "livemode": true,
      "metadata": { "key": "value" },
      "retryable": false,
      "created_at": "2018-05-01T11:45:14-0300",
      "updated_at": "2018-05-01T11:45:14-0300",
      "charge_date": "2019-05-15",
      "description": "Pago extra",
      "subscription": null,
      "name": "Máximo Irizarry",
      "email": "mirrizarry@paez.com",
      "gateway_identifier": "456700",
      "mobile_number": "+5493812596655",
      "identification_type": "",
      "identification_number": ""
    }
  },
  "livemode": true,
  "resource": "payment",
  "resource_id": "PY6b3Rr6nRMo",
  "type": "payment.retrying"
}

When an event occurs in your account, we’ll send it to every enabled webhook endpoint as a POST request.

Webhooks types

  • checkout.session.async_payment_failed
  • checkout.session.async_payment_succeeded
  • checkout.session.completed
  • checkout.session.expired
  • customer.created
  • customer.disabled
  • customer.restored
  • customer.updated
  • gateway.created
  • gateway.disabled
  • gateway.enabled
  • gateway.updated
  • import.processed
  • mandate.created
  • mandate.restored
  • mandate.revoked
  • payment.cancelled
  • payment.created
  • payment.retrying
  • payment.updated
  • payment_method.automatically_updated
  • payment_method.created
  • payment_method.updated
  • refund.approved
  • refund.created
  • refund.failed
  • subscription.automatically_paused
  • subscription.cancelled
  • subscription.created
  • subscription.finished
  • subscription.paused
  • subscription.resumed
  • subscription.updated
  • user.updated_available_brands

Testing the webhooks in local environments

You can easy create test webhooks using https://webhook.site/ With that you will be able to see what we are sending to our API consumers.

Also, to start integrating the webhooks, your code will need to be accessible from the internet so Debi can reach it with HTTP requests. If you’re working locally, the easiest way to do this is with ngrok.

Webhooks security

Debi signs the webhook events it sends to your endpoints by including a signature in each event’s Debi-Signature header. This allows you to verify that the events were sent by Debi, not by a third party.

Before you can verify signatures, you need to retrieve your endpoint’s secret "Secreto webhook" from your webhooks in our developers panel. Add or select the endpoint you want to obtain the secret for, then click the "mostrar" button.

Debi generates a unique secret key for each endpoint. If you use the same endpoint for both test and live API keys, note that the secret is different for each one. Additionally, if you use multiple endpoints, you must obtain a secret for each one you want to verify signatures on. After this setup, Debi starts to sign each webhook it sends to the endpoint.

Webhooks authenticity validation steps

Debi generates signatures using a hash-based message authentication code (HMAC) with SHA-256. To prevent downgrade attacks.

Step 1: Extract the timestamp and signatures from the header

Split the header, using the , character as the separator, to get a list of elements. Then split each element, using the = character as the separator, to get a prefix and value pair.

The value for the prefix t corresponds to the timestamp, and v1 corresponds to the signature (or signatures). You can discard all other elements.

Step 2: Prepare the signed_payload string

The signed_payload string is created by concatenating:

The timestamp (as a string) The character . The actual JSON payload (that is, the request body)

Step 3: Determine the expected signature

Compute an HMAC with the SHA256 hash function. Use the endpoint’s signing secret as the key, and use the signed_payload string as the message.

Step 4: Compare the signatures

Compare the signature (or signatures) in the header to the expected signature. For an equality match, compute the difference between the current timestamp and the received timestamp, then decide if the difference is within your tolerance.

To protect against timing attacks, use a constant-time string comparison to compare the expected signature to each of the received signatures.

Customers

This object represents a customer of your organization. It lets you create subscriptions and track payments that belong to the same customer.

id
required
string

Unique identifier for the Customer.

name
required
null or string

The customer's full name or business name.

email
required
null or string

The customer's email address.

object
required
string
Value: "customer"
livemode
required
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata
required
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

mobile_number
required
null or string

Customer's valid phone number (with area code).

default_payment_method_id
null or string
gateway_identifier
required
null or string

The customer's reference for bank account statements.

identification_number
required
null or string

Customer's Document ID number.

identification_type
required
null or string

Customer's Document type.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
required
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

deleted_at
required
null or string <date-time>

Time at which the object was deleted. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

{
  • "id": "CS3Z25Agp708",
  • "object": "customer",
  • "gateway_identifier": 1723393503,
  • "name": "Andrés Bahena Tercero",
  • "email": "andres37@calvillo.info",
  • "identification_type": null,
  • "identification_number": null,
  • "mobile_number": "+5481934863501",
  • "metadata": {
    },
  • "livemode": true,
  • "created_at": "2021-07-05T12:24:32-03:00",
  • "updated_at": "2021-07-05T12:24:32-03:00",
  • "deleted_at": null
}

List all customers

By default newest customers will be first on the list.

Authorizations:
SecretKeyAuthentication
query Parameters
all
boolean

Include archived records.

object (range_query_specs)

A filter on the list, based on the object created_at field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.

ending_before
string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

starting_after
string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

Response Schema: application/json
required
Array of objects (Customer)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/customers?all=SOME_BOOLEAN_VALUE&created_at=SOME_OBJECT_VALUE&ending_before=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&starting_after=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "links": {},
  • "meta": {}
}

Create a customer

Create a customer.

Authorizations:
SecretKeyAuthentication
Request Body schema: application/json
required
name
null or string

The customer's full name or business name.

email
null or string

The customer's email address.

gateway_identifier
null or string

The customer's reference for bank account statements.

identification_type
null or string

Customer's Document type.

identification_number
null or string

Customer's Document ID number.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Responses

Response Schema: application/json
object (Customer)

This object represents a customer of your organization.

id
required
string

Unique identifier for the Customer.

name
required
null or string

The customer's full name or business name.

email
required
null or string

The customer's email address.

object
required
string
Value: "customer"
livemode
required
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata
required
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

mobile_number
required
null or string

Customer's valid phone number (with area code).

default_payment_method_id
null or string
gateway_identifier
required
null or string

The customer's reference for bank account statements.

identification_number
required
null or string

Customer's Document ID number.

identification_type
required
null or string

Customer's Document type.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
required
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

deleted_at
required
null or string <date-time>

Time at which the object was deleted. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

Request samples

Content type
application/json
{
  • "name": "Pedro Lombardo",
  • "email": "pedrolombardo@email.com",
  • "gateway_identifier": "1234",
  • "identification_type": "DNI",
  • "identification_number": "237767265",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieve a customer

Retrieve a customer.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: CS9PL8eeo8aB

Responses

Response Schema: application/json
object (Customer)

This object represents a customer of your organization.

id
required
string

Unique identifier for the Customer.

name
required
null or string

The customer's full name or business name.

email
required
null or string

The customer's email address.

object
required
string
Value: "customer"
livemode
required
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata
required
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

mobile_number
required
null or string

Customer's valid phone number (with area code).

default_payment_method_id
null or string
gateway_identifier
required
null or string

The customer's reference for bank account statements.

identification_number
required
null or string

Customer's Document ID number.

identification_type
required
null or string

Customer's Document type.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
required
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

deleted_at
required
null or string <date-time>

Time at which the object was deleted. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

Request samples

curl --request GET \
  --url https://api.debi.pro/v1/customers/CS9PL8eeo8aB \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update a customer

Update a customer.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: CS9PL8eeo8aB
Request Body schema: application/json
required
name
null or string

The customer's full name or business name.

email
null or string

The customer's email address.

gateway_identifier
null or string

The customer's reference for bank account statements.

identification_type
null or string

Customer's Document type.

identification_number
null or string

Customer's Document ID number.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Responses

Response Schema: application/json
object (Customer)

This object represents a customer of your organization.

id
required
string

Unique identifier for the Customer.

name
required
null or string

The customer's full name or business name.

email
required
null or string

The customer's email address.

object
required
string
Value: "customer"
livemode
required
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata
required
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

mobile_number
required
null or string

Customer's valid phone number (with area code).

default_payment_method_id
null or string
gateway_identifier
required
null or string

The customer's reference for bank account statements.

identification_number
required
null or string

Customer's Document ID number.

identification_type
required
null or string

Customer's Document type.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
required
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

deleted_at
required
null or string <date-time>

Time at which the object was deleted. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

Request samples

Content type
application/json
{
  • "name": "Pedro Lombardo",
  • "email": "pedrolombardo@email.com"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Archive a customer

Archive the customer and cancel subscriptions and payments in process.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: CS9PL8eeo8aB

Responses

Request samples

curl --request POST \
  --url https://api.debi.pro/v1/customers/CS9PL8eeo8aB/actions/archive \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "message": "Archived successfully"
}

Restore a customer

Immediately restore the customer.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: CS9PL8eeo8aB

Responses

Request samples

curl --request POST \
  --url https://api.debi.pro/v1/customers/CS9PL8eeo8aB/actions/restore \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "message": "Restored successfully"
}

Search customers

Search customers.

Authorizations:
SecretKeyAuthentication
query Parameters
q
required
string
Example: q=john doe

The search query string. See search query language and the list of supported query fields for charges.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

page
required
string
Example: page=john doe

A cursor for pagination across multiple pages of results. Don’t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

Responses

Response Schema: application/json
required
Array of objects (Customer)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/customers/search?q=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&page=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Events

Events are our way of letting you know when something interesting happens in your account. When an interesting event occurs, we create a new Event object. For example, when a payment updates, we create a payment.updated event. Note that many API requests may cause multiple events to be created. For example, if you create a new subscription for a customer, you will receive both a customer.subscription.created event and a payment.created event.

Los eventos ocurren cuando cambia el estado de otro recurso API. El estado del recurso al momento del cambio está embebido en el campo data del evento. Por ejemplo, un evento de payment.updated contendrá un pago y un evento customer.created contendrá un cliente.

id
string

Unique identifier for the Event.

object
string
Value: "event"
created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

object
delivered_at
null or string <date-time>

Time at which the event was delivered. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

resource
string
Enum: "customer" "gateway" "import" "mandate" "payment" "payment_method" "subscription"

Resource attached to the event.

resource_id
string

ID for the resource attached to the event.

type
string
Enum: "checkout.session.async_payment_failed" "checkout.session.async_payment_succeeded" "checkout.session.completed" "checkout.session.expired" "customer.created" "customer.disabled" "customer.restored" "customer.updated" "gateway.created" "gateway.disabled" "gateway.enabled" "gateway.updated" "import.processed" "mandate.created" "mandate.restored" "mandate.revoked" "payment.cancelled" "payment.created" "payment.retrying" "payment.updated" "payment_method.automatically_updated" "payment_method.created" "payment_method.updated" "refund.approved" "refund.created" "refund.failed" "subscription.automatically_paused" "subscription.cancelled" "subscription.created" "subscription.finished" "subscription.paused" "subscription.resumed" "subscription.updated" "user.updated_available_brands"

Event type.

{
  • "created_at": "2022-02-05T01:42:13-03:00",
  • "data": {
    },
  • "delivered_at": "2022-02-11T20:11:38-03:00",
  • "id": "EVaX3JagwR6x",
  • "livemode": true,
  • "object": "event",
  • "resource": "customer",
  • "resource_id": "CSnlZxyY3jwr",
  • "type": "customer.created"
}

List events

Returns a cursor-paginated list of your events.

Authorizations:
SecretKeyAuthentication
query Parameters
delivery_success
boolean

Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.

related_object
string <= 255 characters
Example: related_object=CS9PL8eeo8aB

Filters events for a single object. Can receive any ID.

type
string <= 255 characters

A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.

object (range_query_specs)

A filter on the list, based on the object created_at field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.

ending_before
string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

starting_after
string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

Response Schema: application/json
Array of objects (Event)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/events?delivery_success=SOME_BOOLEAN_VALUE&related_object=SOME_STRING_VALUE&type=SOME_STRING_VALUE&created_at=SOME_OBJECT_VALUE&ending_before=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&starting_after=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "links": {},
  • "meta": {}
}

Retrieve an event

Retrieve an event.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: EVaX3JagwR6x

Responses

Response Schema: application/json
object (Event)

This object represents an event of your account.

id
string

Unique identifier for the Event.

object
string
Value: "event"
created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

object
delivered_at
null or string <date-time>

Time at which the event was delivered. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

resource
string
Enum: "customer" "gateway" "import" "mandate" "payment" "payment_method" "subscription"

Resource attached to the event.

resource_id
string

ID for the resource attached to the event.

type
string
Enum: "checkout.session.async_payment_failed" "checkout.session.async_payment_succeeded" "checkout.session.completed" "checkout.session.expired" "customer.created" "customer.disabled" "customer.restored" "customer.updated" "gateway.created" "gateway.disabled" "gateway.enabled" "gateway.updated" "import.processed" "mandate.created" "mandate.restored" "mandate.revoked" "payment.cancelled" "payment.created" "payment.retrying" "payment.updated" "payment_method.automatically_updated" "payment_method.created" "payment_method.updated" "refund.approved" "refund.created" "refund.failed" "subscription.automatically_paused" "subscription.cancelled" "subscription.created" "subscription.finished" "subscription.paused" "subscription.resumed" "subscription.updated" "user.updated_available_brands"

Event type.

Request samples

curl --request GET \
  --url https://api.debi.pro/v1/events/EVaX3JagwR6x \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": {
    }
}

Gateways

A gateway is a institution that authorizes and facilitates payments. It can be a payment processor, a bank, or a card network. In Debi, the gateway object represents the specific configuration and credentials that your company uses to access each service.

approved_at
string <date-time>

Time at which the gateway was marked as approved. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

code_length
null or number

Code length

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

disabled
boolean

Whether the gateway is disabled.

id
string

Unique identifier for the Gateway.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

number
string

Merchant identifier.

number_bank_retries
null or number

Number Bank Retries.

object
string
Value: "gateway"
provider
string
Enum: "amex" "bac" "banamex" "banistmo" "banorte" "cabal" "cbu-bind" "cbu-galicia" "cbu-patagonia" "favacard" "fiserv-argentina" "fiserv-mexico" "mercado-pago-argentina" "naranja" "payway" "prisma-visa" "prisma-visa-debit" "prisma-mastercard" "wompi"

Provider.

object

Supported payment methods for this Gateway.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

username
string

Gateway current username.

{
  • "approved_at": "2023-02-14T11:41:40-03:00",
  • "code_length": null,
  • "created_at": "2023-01-31T16:18:31-03:00",
  • "disabled": false,
  • "id": "GWM8DK6VKoG3",
  • "livemode": false,
  • "number": "1203764444",
  • "number_bank_retries": null,
  • "object": "gateway",
  • "provider": "mercado-pago-argentina",
  • "supported_payment_methods": {
    },
  • "updated_at": "2023-02-01T16:36:06-03:00",
  • "username": "user@name.com"
}

List Gateways

Returns a list of all your gateways.

Authorizations:
SecretKeyAuthentication
query Parameters
ending_before
string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

starting_after
string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

Response Schema: application/json
required
Array of objects (Gateway)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/gateways?ending_before=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&starting_after=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Imports

An Import is an object which contains data to be created in Debi. As these objects may be big, they will be created and processed later. You can check the status of the import.

id
string

Unique identifier for the Import.

batch_job
object
cancelled_at
null or string <date-time>

Time at which the import was marked as cancelled. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

invalid_at
null or string <date-time>

Time at which the import was marked as invalid. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

processed_at
null or string <date-time>

Time at which the import was marked as processed. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

ready_at
null or string <date-time>

Time at which the import was marked as ready. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

invalid_rows_count
number

Invalid Rows Count

valid_rows_count
number

Valid Rows Count

rows_count
number

Rows Count

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

original_filename
string
type
string

Import Type

status
string

Import Status

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

{
  • "batch_job": {
    },
  • "cancelled_at": null,
  • "created_at": "2021-06-08T09:49:04-03:00",
  • "id": "IMB1rRDqkM5X",
  • "invalid_at": null,
  • "invalid_rows_count": 0,
  • "livemode": true,
  • "original_filename": "subscriptions-import-template.csv",
  • "processed_at": "2021-06-08T09:49:06-03:00",
  • "ready_at": "2021-06-08T09:49:05-03:00",
  • "rows_count": 2,
  • "status": "processed",
  • "type": "subscriptions",
  • "updated_at": "2021-06-08T09:49:06-03:00",
  • "valid_rows_count": 2
}

List Imports

Returns a list of all your imports.

Authorizations:
SecretKeyAuthentication
query Parameters
search
string
Example: search=foo@bar.com

Search.

status
string
Example: status=ready

Allowed values: pending, ready, invalid, cancelled, processing, processed.

object (range_query_specs)

A filter on the list, based on the object created_at field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.

ending_before
string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

starting_after
string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

Response Schema: application/json
required
Array of objects (Import)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/imports?search=SOME_STRING_VALUE&status=SOME_STRING_VALUE&created_at=SOME_OBJECT_VALUE&ending_before=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&starting_after=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a import

Create a import.

Authorizations:
SecretKeyAuthentication
Request Body schema: application/json
required
type
string
filename
string
original_filename
string
auto
boolean
metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Responses

Response Schema: application/json
object (Import)

This object represents an import of your account.

id
string

Unique identifier for the Import.

batch_job
object
cancelled_at
null or string <date-time>

Time at which the import was marked as cancelled. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

invalid_at
null or string <date-time>

Time at which the import was marked as invalid. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

processed_at
null or string <date-time>

Time at which the import was marked as processed. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

ready_at
null or string <date-time>

Time at which the import was marked as ready. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

invalid_rows_count
number

Invalid Rows Count

valid_rows_count
number

Valid Rows Count

rows_count
number

Rows Count

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

original_filename
string
type
string

Import Type

status
string

Import Status

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

Request samples

Content type
application/json
{
  • "type": "customers",
  • "filename": "a.csv",
  • "original_filename": "a.csv",
  • "auto": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieve a import

Retrieve a import.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: IMKd7zlGJAna

Import ID.

Responses

Response Schema: application/json
object (Import)

This object represents an import of your account.

id
string

Unique identifier for the Import.

batch_job
object
cancelled_at
null or string <date-time>

Time at which the import was marked as cancelled. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

invalid_at
null or string <date-time>

Time at which the import was marked as invalid. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

processed_at
null or string <date-time>

Time at which the import was marked as processed. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

ready_at
null or string <date-time>

Time at which the import was marked as ready. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

invalid_rows_count
number

Invalid Rows Count

valid_rows_count
number

Valid Rows Count

rows_count
number

Rows Count

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

original_filename
string
type
string

Import Type

status
string

Import Status

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

Request samples

curl --request GET \
  --url https://api.debi.pro/v1/imports/IMKd7zlGJAna \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": {
    }
}

List Import Rows

List Import Rows.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: IMKd7zlGJAna

Import ID.

query Parameters
filter
string

Validation. Example: valid. Allows values: valid, invalid.

object (range_query_specs)

A filter on the list, based on the object created_at field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.

ending_before
string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

starting_after
string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

Response Schema: application/json
required
Array of objects (Import Row)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/imports/IMKd7zlGJAna/rows?filter=SOME_STRING_VALUE&created_at=SOME_OBJECT_VALUE&ending_before=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&starting_after=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Mandates

A Mandate is a record of the permission a customer has given you to debit their payment method.

id
string

Unique identifier for the Mandate.

status
string
Enum: "active" "revoked"

Status.

uuid
string

UUID identifier for the object. [Legacy]

object
string
Value: "mandate"
livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

object (Customer)

This object represents a customer of your organization.

object (Payment Method)

This object represents a payment method of your account.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

deleted_at
null or string <date-time>

Time at which the object was deleted. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

{
  • "created_at": "2022-02-01T19:06:37-03:00",
  • "customer": {
    },
  • "deleted_at": null,
  • "id": "MA9aQOWen2kZe6qypB",
  • "uuid": "3990a740-83ab-11ec-8651-cde6203c968e",
  • "livemode": true,
  • "metadata": {
    },
  • "object": "mandate",
  • "payment_method": {
    },
  • "status": "active",
  • "updated_at": "2022-02-01T19:06:37-03:00"
}

List all mandates

By default newest mandates will be first on the list.

Authorizations:
SecretKeyAuthentication
query Parameters
all
boolean

Include archived mandates.

customer_id
string
Example: customer_id=CS9PL8eeo8aB
object (range_query_specs)

A filter on the list, based on the object created_at field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.

ending_before
string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

starting_after
string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

Response Schema: application/json
required
Array of objects (Mandate)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/mandates?all=SOME_BOOLEAN_VALUE&customer_id=SOME_STRING_VALUE&created_at=SOME_OBJECT_VALUE&ending_before=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&starting_after=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a mandate

Create a mandate.

Authorizations:
SecretKeyAuthentication
Request Body schema: application/json
optional
customer_id
string
payment_method_id

Responses

Request samples

Content type
application/json
{
  • "customer_id": "CS3oDRqz9wzB",
  • "payment_method_id": "PMBja4YZ2GDR"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieve a mandate

Retrieve a mandate.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: MA9aQOWen2kZe6qypB

Responses

Response Schema: application/json
object (Mandate)

This object represents a mandate of your organization.

id
string

Unique identifier for the Mandate.

status
string
Enum: "active" "revoked"

Status.

uuid
string

UUID identifier for the object. [Legacy]

object
string
Value: "mandate"
livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

object (Customer)

This object represents a customer of your organization.

object (Payment Method)

This object represents a payment method of your account.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

deleted_at
null or string <date-time>

Time at which the object was deleted. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

Request samples

curl --request GET \
  --url https://api.debi.pro/v1/mandates/MA9aQOWen2kZe6qypB \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": {
    }
}

Revoke a mandate

This action will revoke the mandate and also cancel all the cancellable subscriptions attached to the same customer and payment method.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: MA9aQOWen2kZe6qypB

Responses

Request samples

curl --request POST \
  --url https://api.debi.pro/v1/mandates/MA9aQOWen2kZe6qypB/actions/revoke \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": {
    }
}

Restore mandate

This action will restore the revoked mandate.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: MA9aQOWen2kZe6qypB

Responses

Request samples

curl --request POST \
  --url https://api.debi.pro/v1/mandates/MA9aQOWen2kZe6qypB/actions/restore \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": {
    }
}

Search mandates

Search mandates.

Authorizations:
SecretKeyAuthentication
query Parameters
q
required
string
Example: q=john doe

The search query string. See search query language and the list of supported query fields for charges.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

page
required
string
Example: page=john doe

A cursor for pagination across multiple pages of results. Don’t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

Responses

Response Schema: application/json
required
Array of objects (Mandate)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/mandates/search?q=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&page=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Payment Methods

PaymentMethod objects represent your customer's payment instruments. You can use them with to create Payments or Subscriptions to a Customer.

id
string

Unique identifier for the object.

object
string
Value: "payment_method"
type
string
Enum: "card" "cbu"

Type of paymet method. One of: cbu, card.

object (Credit Card)

This object represents a credit card of your account.

object (CBU)

This object represents a CBU bak account of your account.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

{
  • "card": {
    },
  • "created_at": "2022-02-01T23:13:04-03:00",
  • "id": "PMBja4YZ2GDR",
  • "livemode": true,
  • "metadata": null,
  • "object": "payment_method",
  • "type": "card",
  • "updated_at": "2022-02-01T23:13:04-03:00"
}

List all payment methods

Returns a list of payment methods.

Authorizations:
SecretKeyAuthentication
query Parameters
page
number
Example: page=1

Cursor value to paginate response.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

Responses

Response Schema: application/json
required
Array of objects (Payment Method)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/payment_methods?page=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "links": {},
  • "meta": {}
}

Create a payment method

Create a payment method

Authorizations:
PublishableKeyAuthenticationSecretKeyAuthentication
Request Body schema: application/json
optional
type
string
Enum: "card" "cbu"

One of card or cbu.

object (Credit Card)

This object represents a credit card of your account.

object (CBU)

This object represents a CBU bak account of your account.

Responses

Response Schema: application/json
object (Payment Method)

This object represents a payment method of your account.

id
string

Unique identifier for the object.

object
string
Value: "payment_method"
type
string
Enum: "card" "cbu"

Type of paymet method. One of: cbu, card.

object (Credit Card)

This object represents a credit card of your account.

object (CBU)

This object represents a CBU bak account of your account.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

Request samples

Content type
application/json
Example
{
  • "type": "card",
  • "card": {
    }
}

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Retrieve a payment method

Retrieve a payment method.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: PMVA0W8y1aQO

Payment method ID.

Responses

Response Schema: application/json
object (Payment Method)

This object represents a payment method of your account.

id
string

Unique identifier for the object.

object
string
Value: "payment_method"
type
string
Enum: "card" "cbu"

Type of paymet method. One of: cbu, card.

object (Credit Card)

This object represents a credit card of your account.

object (CBU)

This object represents a CBU bak account of your account.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

Request samples

curl --request GET \
  --url https://api.debi.pro/v1/payment_methods/PMVA0W8y1aQO \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": {
    }
}

Search payment methods

Search payment methods.

Authorizations:
SecretKeyAuthentication
query Parameters
q
required
string
Example: q=john doe

The search query string. See search query language and the list of supported query fields for charges.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

page
required
string
Example: page=john doe

A cursor for pagination across multiple pages of results. Don’t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

Responses

Response Schema: application/json
required
Array of objects (Payment Method)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/payment_methods/search?q=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&page=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Payments

A Payment is an object you create to charge a credit, debit card, or bank account. You can retrieve information about the payment and also refund them partially or totally.

Status Meaning
pending_submission The payment has been issued, but still not submitted to the finnancial entity
cancelled The payment has been manually cancelled
submitted The payment is succesfully submitted and being processing by the finnancial entity
failed Couldn't be submitted to the finnancial entity. There is an error in the request
will_retry The attempt failed, but the finnancial entity will make a new attempt
approved Submitted OK and approved
rejected Submitted OK but couldn't make the collection
chargeback The customer asked the bank to get them their money back
refunded The payment has been returned to the customer
partially_refunded A partial amount of the payment has been returned to the customer
id
string

Unique identifier for the Payment.

object
string
Value: "payment"
amount
number

Payment amount

amount_refunded
number

Payment amount refunded.

currency
string
Enum: "ARS" "BRL" "CLP" "COP" "MXN" "USB" "USD"

Currency for the transacion using ISO_4217 codes. Defaults to account's default.

description
string

Payment description

status
string
Enum: "pending_submission" "cancelled" "submitted" "failed" "will_retry" "approved" "rejected" "chargeback" "refunded" "partially_refunded"

Payment Status

response_message
string

Financial institution detailed response

paid
boolean

The payment has been succesfully collected.

retryable
boolean

The payment can be retried.

refundable
boolean

The payment can be refunded.

amount_refundable
number

The amount of payment that can be refunded.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

charge_date
string

A future date on which the payment should be collected. If not specified, the payment will be collected as soon as possible.

submissions_count
number

The number of time the payment has been sent to the financial institution.

can_auto_retry_until
null or string

The latest date the payment will be sent to the financial institution. Null means no limit

auto_retries_max_attempts
null or number

The maximum number of times the payment could be automatically retried.

effective_charged_date
null or string

The date when the payment will be collected.

estimated_accreditation_date
null or string

The estimated date when the financial institution will send the amount collect to your account.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_status
null or string

The latest date the payment status was changed.

object (Customer)

This object represents a customer of your organization.

subscription
null or string

The Subscription associated with the payment if existent.

subscription_payment_number
null or string

The number of payment of the associated Subscription, if existent.

gateway
string

The Gateway associated with the payment.

object (Payment Method)

This object represents a payment method of your account.

gateway_identifier
null or string

The custom number you send to the gateway network. In most cases this value is null.

binary_mode
boolean

Forces instantaneous payment processing, providing an immediate status of either approved or rejected within the request response. This setting eliminates automatic retries for failed payments, ensuring a swift and conclusive outcome.

refunds
Array of arrays

Refunds associated with this payment.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

{
  • "id": "PY9J8YYdylz6",
  • "object": "payment",
  • "amount": 2300,
  • "amount_refunded": 0,
  • "currency": "ARS",
  • "description": "Ajuste por deuda pasada",
  • "status": "approved",
  • "response_message": "Transacción aceptada",
  • "paid": true,
  • "retryable": false,
  • "refundable": true,
  • "amount_refundable": 2300,
  • "livemode": true,
  • "created_at": "2022-08-03T12:24:33-03:00",
  • "charge_date": "2022-08-03",
  • "submissions_count": 1,
  • "can_auto_retry_until": null,
  • "auto_retries_max_attempts": null,
  • "effective_charged_date": "2022-08-05",
  • "estimated_accreditation_date": "2022-08-19",
  • "updated_at": "2022-08-03T12:24:33-03:00",
  • "updated_status": "2022-08-05",
  • "customer": {
    },
  • "subscription": null,
  • "subscription_payment_number": null,
  • "gateway": "GW1L49J7ARW3",
  • "payment_method": {
    },
  • "gateway_identifier": null,
  • "metadata": null,
  • "refunds": [ ]
}

List payments

Newest payments will be first on the list.

Authorizations:
SecretKeyAuthentication
query Parameters
customer_id
string
Example: customer_id=CS9PL8eeo8aB

Show only payment methods from a given customer.

subscription_id
string
Example: subscription_id=SBmX1MrZ77Mwq3

Show only payment methods from a given subscription.

object (range_query_specs)

A filter on the list, based on the object created_at field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.

ending_before
string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

starting_after
string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

Response Schema: application/json
required
Array of objects (Payment)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/payments?customer_id=SOME_STRING_VALUE&subscription_id=SOME_STRING_VALUE&created_at=SOME_OBJECT_VALUE&ending_before=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&starting_after=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a payment

Create a payment.

Authorizations:
SecretKeyAuthentication
Request Body schema: application/json
optional
amount
required
number

The amount of the payment.

description
required
string

The description of the payment.

customer_id
required
string
payment_method_id
required
string

The Payment Method ID for this payment.

charge_date
string <date>

A future date on which the payment should be collected. If not specified, the payment will be collected as soon as possible.

can_auto_retry_until
string <date>

The maximum date the payment could be retried automatically.

auto_retries_max_attempts
integer

The maximum amount of times the payment could be retried automatically.

gateway_identifier
string

Gateway identifier for your payment.

binary_mode
boolean

Forces instantaneous payment processing, providing an immediate status of either approved or rejected within the request response. This setting eliminates automatic retries for failed payments, ensuring a swift and conclusive outcome.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Responses

Response Schema: application/json
object (Payment)

This object represents a payments of your organization.

id
string

Unique identifier for the Payment.

object
string
Value: "payment"
amount
number

Payment amount

amount_refunded
number

Payment amount refunded.

currency
string
Enum: "ARS" "BRL" "CLP" "COP" "MXN" "USB" "USD"

Currency for the transacion using ISO_4217 codes. Defaults to account's default.

description
string

Payment description

status
string
Enum: "pending_submission" "cancelled" "submitted" "failed" "will_retry" "approved" "rejected" "chargeback" "refunded" "partially_refunded"

Payment Status

response_message
string

Financial institution detailed response

paid
boolean

The payment has been succesfully collected.

retryable
boolean

The payment can be retried.

refundable
boolean

The payment can be refunded.

amount_refundable
number

The amount of payment that can be refunded.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

charge_date
string

A future date on which the payment should be collected. If not specified, the payment will be collected as soon as possible.

submissions_count
number

The number of time the payment has been sent to the financial institution.

can_auto_retry_until
null or string

The latest date the payment will be sent to the financial institution. Null means no limit

auto_retries_max_attempts
null or number

The maximum number of times the payment could be automatically retried.

effective_charged_date
null or string

The date when the payment will be collected.

estimated_accreditation_date
null or string

The estimated date when the financial institution will send the amount collect to your account.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_status
null or string

The latest date the payment status was changed.

object (Customer)

This object represents a customer of your organization.

subscription
null or string

The Subscription associated with the payment if existent.

subscription_payment_number
null or string

The number of payment of the associated Subscription, if existent.

gateway
string

The Gateway associated with the payment.

object (Payment Method)

This object represents a payment method of your account.

gateway_identifier
null or string

The custom number you send to the gateway network. In most cases this value is null.

binary_mode
boolean

Forces instantaneous payment processing, providing an immediate status of either approved or rejected within the request response. This setting eliminates automatic retries for failed payments, ensuring a swift and conclusive outcome.

refunds
Array of arrays

Refunds associated with this payment.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Request samples

Content type
application/json
{
  • "amount": 100,
  • "description": "Unique payment",
  • "gateway_identifier": "001234",
  • "customer_id": "CSr7Dg3LkDP2",
  • "payment_method_id": "PMBja4YZ2GDR"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieve a payment

Retrieve a payment.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: PYdOz9bgVReV

Responses

Response Schema: application/json
object (Payment)

This object represents a payments of your organization.

id
string

Unique identifier for the Payment.

object
string
Value: "payment"
amount
number

Payment amount

amount_refunded
number

Payment amount refunded.

currency
string
Enum: "ARS" "BRL" "CLP" "COP" "MXN" "USB" "USD"

Currency for the transacion using ISO_4217 codes. Defaults to account's default.

description
string

Payment description

status
string
Enum: "pending_submission" "cancelled" "submitted" "failed" "will_retry" "approved" "rejected" "chargeback" "refunded" "partially_refunded"

Payment Status

response_message
string

Financial institution detailed response

paid
boolean

The payment has been succesfully collected.

retryable
boolean

The payment can be retried.

refundable
boolean

The payment can be refunded.

amount_refundable
number

The amount of payment that can be refunded.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

charge_date
string

A future date on which the payment should be collected. If not specified, the payment will be collected as soon as possible.

submissions_count
number

The number of time the payment has been sent to the financial institution.

can_auto_retry_until
null or string

The latest date the payment will be sent to the financial institution. Null means no limit

auto_retries_max_attempts
null or number

The maximum number of times the payment could be automatically retried.

effective_charged_date
null or string

The date when the payment will be collected.

estimated_accreditation_date
null or string

The estimated date when the financial institution will send the amount collect to your account.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_status
null or string

The latest date the payment status was changed.

object (Customer)

This object represents a customer of your organization.

subscription
null or string

The Subscription associated with the payment if existent.

subscription_payment_number
null or string

The number of payment of the associated Subscription, if existent.

gateway
string

The Gateway associated with the payment.

object (Payment Method)

This object represents a payment method of your account.

gateway_identifier
null or string

The custom number you send to the gateway network. In most cases this value is null.

binary_mode
boolean

Forces instantaneous payment processing, providing an immediate status of either approved or rejected within the request response. This setting eliminates automatic retries for failed payments, ensuring a swift and conclusive outcome.

refunds
Array of arrays

Refunds associated with this payment.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Request samples

curl --request GET \
  --url https://api.debi.pro/v1/payments/PYdOz9bgVReV \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update a payment

Update a payment.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: PYdOz9bgVReV
Request Body schema: application/json
required
amount
number

The new amount of the payment.

auto_retries_max_attempts
integer

The maximum amount of times the payment could be retried automatically.

can_auto_retry_until
string <date>

The maximum date the payment could be retried automatically.

charge_date
string <date>

A future date on which the payment should be collected.

description
string

The new description of the payment.

payment_method_id
string

The Payment Method ID for this payment.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Responses

Response Schema: application/json
object (Payment)

This object represents a payments of your organization.

id
string

Unique identifier for the Payment.

object
string
Value: "payment"
amount
number

Payment amount

amount_refunded
number

Payment amount refunded.

currency
string
Enum: "ARS" "BRL" "CLP" "COP" "MXN" "USB" "USD"

Currency for the transacion using ISO_4217 codes. Defaults to account's default.

description
string

Payment description

status
string
Enum: "pending_submission" "cancelled" "submitted" "failed" "will_retry" "approved" "rejected" "chargeback" "refunded" "partially_refunded"

Payment Status

response_message
string

Financial institution detailed response

paid
boolean

The payment has been succesfully collected.

retryable
boolean

The payment can be retried.

refundable
boolean

The payment can be refunded.

amount_refundable
number

The amount of payment that can be refunded.

livemode
boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

charge_date
string

A future date on which the payment should be collected. If not specified, the payment will be collected as soon as possible.

submissions_count
number

The number of time the payment has been sent to the financial institution.

can_auto_retry_until
null or string

The latest date the payment will be sent to the financial institution. Null means no limit

auto_retries_max_attempts
null or number

The maximum number of times the payment could be automatically retried.

effective_charged_date
null or string

The date when the payment will be collected.

estimated_accreditation_date
null or string

The estimated date when the financial institution will send the amount collect to your account.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_status
null or string

The latest date the payment status was changed.

object (Customer)

This object represents a customer of your organization.

subscription
null or string

The Subscription associated with the payment if existent.

subscription_payment_number
null or string

The number of payment of the associated Subscription, if existent.

gateway
string

The Gateway associated with the payment.

object (Payment Method)

This object represents a payment method of your account.

gateway_identifier
null or string

The custom number you send to the gateway network. In most cases this value is null.

binary_mode
boolean

Forces instantaneous payment processing, providing an immediate status of either approved or rejected within the request response. This setting eliminates automatic retries for failed payments, ensuring a swift and conclusive outcome.

refunds
Array of arrays

Refunds associated with this payment.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Request samples

Content type
application/json
{
  • "description": "New payment title"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Cancel payment

Cancel payment.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: PYdOz9bgVReV

Responses

Request samples

curl --request POST \
  --url https://api.debi.pro/v1/payments/PYdOz9bgVReV/actions/cancel \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "message": "Cancelled successfully"
}

Retry a payment

Retry a payment.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: PYdOz9bgVReV

Responses

Request samples

curl --request POST \
  --url https://api.debi.pro/v1/payments/PYdOz9bgVReV/actions/retry \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "message": "Retried successfully"
}

Stop auto retrying

Stop auto retrying, avoid the payment beying retrying after a rejection. This action can be requested at any time of the payment cycle, even when the payment is sent and beying processed by the finantial institution.

Authorizations:
SecretKeyAuthentication
path Parameters
id
required
string
Example: PYdOz9bgVReV

Responses

Request samples

curl --request POST \
  --url https://api.debi.pro/v1/payments/PYdOz9bgVReV/actions/stop_auto_retrying \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "message": "Stopped autoretries successfully"
}

Search payments

Search payments.

Authorizations:
SecretKeyAuthentication
query Parameters
q
required
string
Example: q=john doe

The search query string. See search query language and the list of supported query fields for charges.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

page
required
string
Example: page=john doe

A cursor for pagination across multiple pages of results. Don’t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

Responses

Response Schema: application/json
required
Array of objects (Payment)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/payments/search?q=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&page=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Refunds

Refund objects allow you to refund a payment that has previously been created but not yet totally refunded. Funds will be refunded to the credit, debit card, or bank account that was originally charged.

Status Meaning
pending_submission The refund has been issued, but still not submitted to the finnancial entity
submitted The refund is succesfully submitted and being processing by the finnancial entity
failed Submitted OK but rejected by the finnancial entity
approved Submitted OK and approved
id
string

Unique identifier for the Refund.

object
string
Value: "refund"
payment_id
string
amount
number

Refund amount.

currency
string
Enum: "ARS" "BRL" "CLP" "COP" "MXN" "USB" "USD"

Currency for the transacion using ISO_4217 codes. Defaults to account's default.

reason
string
Enum: "duplicate" "error" "requested_by_customer"

Refund Reason

status
string
Enum: "pending_submission" "submitted" "failed" "approved"

Refund Status

created_at
string <date-time>

Time at which the object was created. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

updated_at
string <date-time>

Time at which the object was last updated. Formatting follows RFC339. Example: 2015-10-21T08:29:31-03:00.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

{
  • "id": "RFOBXM90YZp4AD",
  • "object": "refund",
  • "payment_id": "PYpzMDDy4mJ3",
  • "amount": 100,
  • "currency": "ARS",
  • "reason": "error",
  • "status": "approved",
  • "created_at": "2022-02-05T12:24:33-03:00",
  • "updated_at": "2022-02-05T12:24:33-03:00",
  • "metadata": null
}

List all refunds

By default newest refunds will be first on the list.

Authorizations:
SecretKeyAuthentication
query Parameters
object (range_query_specs)

A filter on the list, based on the object created_at field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.

ending_before
string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

limit
integer
Example: limit=20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 25.

starting_after
string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Responses

Response Schema: application/json
required
Array of objects (Refund)
object (Response Meta)

Pagination links

object (Response Meta)

Pagination metadata

Request samples

curl --request GET \
  --url 'https://api.debi.pro/v1/refunds?created_at=SOME_OBJECT_VALUE&ending_before=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&starting_after=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer sk_live_...'

Response samples

Content type
application/json
{}

Create a refund

Create a refund.

Authorizations:
SecretKeyAuthentication
Request Body schema: application/json
payment_id
required
string
amount
number

Amount to be refunded. If is null it will refund the whole payment.

reason
required
string

Refund Reason. One of duplicate, error, or requested_by_customer.

metadata
object or null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. All keys can be unset by posting null value to metadata.

Responses

Response Schema: application/json
object (Refund)

This object represents a refunds of your organization.

id
string

Unique identifier for the Refund.

object
string
Value: "refund"
payment_id
string
amount
number

Refund amount.

currency
string
Enum: "ARS" "BRL" "CLP" "COP" "MXN" "USB" "USD"

Currency for the transacion using ISO_4217 codes. Defaults to account's default.

reason
string
Enum: "duplicate" "error" "requested_by_customer"

Refund Reason

status
string
Enum: "pending_submission" "submitted" "failed" "approved"

Refund Status