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:
- Live: https://api.debi.pro/
- Sandbox: https://api.debi-test.pro/
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"
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.
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."
}
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.
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.
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.
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.
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
In sandbox mode the following test cards and bank accounts 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 |
ES9314651865289152293582 | sepa_debit | approved | ||
ES9520808952147978933326 | sepa_debit | rejected | ||
NL69ABNA4040435087 | sepa_debit | approved | ||
NL57INGB4461857859 | sepa_debit | rejected | ||
GB81BARC20038047151643 | sepa_debit | approved | ||
GB75BARC20039513113527 | sepa_debit | rejected |
If you create a payment method using number 4000000320000021
, a payment_method.automatically_updated
event will be dispatched mimicking a credit card renewal.
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.
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 |
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 |
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: |
updated_at required | string <date-time> Time at which the object was last updated. Formatting follows RFC339. Example: |
deleted_at required | null or string <date-time> Time at which the object was deleted. Formatting follows RFC339. Example: |
{- "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": {
- "external_id": "0Qk3IJY5"
}, - "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:
query Parameters
all | boolean Include archived records. |
object (range_query_specs) A filter on the list, based on the object | |
ending_before | string A cursor for use in pagination. |
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. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "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": {
- "external_id": "0Qk3IJY5"
}, - "livemode": true,
- "created_at": "2021-07-05T12:24:32-03:00",
- "updated_at": "2021-07-05T12:24:32-03:00",
- "deleted_at": null
}
], - "links": {
- "first": null,
- "last": null,
- "prev": null
},
}
Create a customer
Create a customer.
Authorizations:
Request Body schema: application/jsonrequired
name | null or string The customer's full name or business name. |
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{- "name": "Pedro Lombardo",
- "email": "pedrolombardo@email.com",
- "gateway_identifier": "1234",
- "identification_type": "DNI",
- "identification_number": "237767265",
- "metadata": {
- "some": "value"
}
}
Response samples
- 201
- 401
- 422
{- "data": {
- "id": "CS3Z25Agp708",
- "object": "customer",
- "gateway_identifier": "1234",
- "name": "Pedro Lombardo",
- "email": "pedrolombardo@email.com",
- "identification_type": "DNI",
- "identification_number": "237767265",
- "mobile_number": null,
- "metadata": {
- "some": "value"
}, - "livemode": true,
- "created_at": "2021-07-05T12:24:32-03:00",
- "updated_at": "2021-07-05T12:24:32-03:00",
- "deleted_at": null
}
}
Retrieve a customer
Retrieve a customer.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request GET \ --url https://api.debi.pro/v1/customers/CS9PL8eeo8aB \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "data": {
- "id": "CSljikas98",
- "name": "Jorgelina Castro",
- "email": "mail@example.com",
- "object": "customer",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "mobile_number": "5491164531234",
- "default_payment_method_id": "PMBja4YZ2GDR.",
- "gateway_identifier": "383473",
- "identification_number": "15.555.324",
- "identification_type": "DNI",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}
}
Update a customer
Update a customer.
Authorizations:
path Parameters
id required |
Request Body schema: application/jsonrequired
name | null or string The customer's full name or business name. |
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{- "name": "Pedro Lombardo",
- "email": "pedrolombardo@email.com"
}
Response samples
- 200
- 401
- 404
- 422
{- "data": {
- "id": "CSljikas98",
- "name": "Jorgelina Castro",
- "email": "mail@example.com",
- "object": "customer",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "mobile_number": "5491164531234",
- "default_payment_method_id": "PMBja4YZ2GDR.",
- "gateway_identifier": "383473",
- "identification_number": "15.555.324",
- "identification_type": "DNI",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}
}
Archive a customer
Archive the customer and cancel subscriptions and payments in process.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/customers/CS9PL8eeo8aB/actions/archive \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "message": "Archived successfully"
}
Restore a customer
Immediately restore the customer.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/customers/CS9PL8eeo8aB/actions/restore \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "message": "Restored successfully"
}
Search customers
Search customers.
Authorizations:
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
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "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": {
- "external_id": "0Qk3IJY5"
}, - "livemode": true,
- "created_at": "2021-07-05T12:24:32-03:00",
- "updated_at": "2021-07-05T12:24:32-03:00",
- "deleted_at": null
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500
}
}
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: |
object | |
delivered_at | null or string <date-time> Time at which the event was delivered. Formatting follows RFC339. Example: |
livemode | boolean Has the value |
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": {
- "object": {
- "created_at": "2022-02-05T01:42:13-03:00",
- "deleted_at": null,
- "email": "john@doe.com",
- "gateway_identifier": "383473",
- "id": "CSnlZxyY3jwr",
- "identification_number": null,
- "identification_type": null,
- "livemode": true,
- "metadata": null,
- "mobile_number": "5491154876503",
- "name": "John Doe",
- "updated_at": "2022-02-05T01:42:13-03:00"
}
}, - "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:
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 |
object (range_query_specs) A filter on the list, based on the object | |
ending_before | string A cursor for use in pagination. |
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. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "created_at": "2022-02-05T01:42:13-03:00",
- "data": {
- "object": {
- "created_at": "2022-02-05T01:42:13-03:00",
- "deleted_at": null,
- "email": "john@doe.com",
- "gateway_identifier": "383473",
- "id": "CSnlZxyY3jwr",
- "identification_number": null,
- "identification_type": null,
- "livemode": true,
- "metadata": null,
- "mobile_number": "5491154876503",
- "name": "John Doe",
- "updated_at": "2022-02-05T01:42:13-03:00"
}
}, - "delivered_at": "2022-02-11T20:11:38-03:00",
- "id": "EVaX3JagwR6x",
- "livemode": true,
- "object": "event",
- "resource": "customer",
- "resource_id": "CSnlZxyY3jwr",
- "type": "customer.created"
}
], - "links": {
- "first": null,
- "last": null,
},
}
Retrieve an event
Retrieve an event.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request GET \ --url https://api.debi.pro/v1/events/EVaX3JagwR6x \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "data": {
- "id": "EVm3RnKn3knw",
- "object": "event",
- "created_at": "2022-02-11T23:19:22-03:00",
- "data": {
- "object": { }
}, - "delivered_at": "2022-02-11T23:19:22-03:00",
- "livemode": true,
- "resource": "customer",
- "resource_id": "CS12312d1d1dl",
- "type": "customer.created"
}
}
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: |
code_length | null or number Code length |
created_at | string <date-time> Time at which the object was created. Formatting follows RFC339. Example: |
disabled | boolean Whether the gateway is disabled. |
id | string Unique identifier for the Gateway. |
livemode | boolean Has the value |
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" "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: |
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",
- "supported_payment_methods": {
- "card": {
- "networks": [
- "diners",
- "jcb",
- "mastercard",
- "visa"
], - "required_fields": [
- "security_code"
]
}
}, - "updated_at": "2023-02-01T16:36:06-03:00",
- "username": "user@name.com"
}
List Gateways
Returns a list of all your gateways.
Authorizations:
query Parameters
ending_before | string A cursor for use in pagination. |
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. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "approved_at": "2023-02-14T11:41:40-03:00",
- "code_length": null,
- "created_at": "2023-02-01T16:33:19-03:00",
- "disabled": false,
- "id": "GWBZqKYEK7Y2",
- "livemode": false,
- "number": "12345",
- "number_bank_retries": null,
- "object": "gateway",
- "provider": "wompi",
- "supported_payment_methods": {
- "card": {
- "networks": [
- "diners",
- "jcb",
- "mastercard",
- "visa"
], - "required_fields": [ ]
}
}, - "updated_at": "2023-02-02T01:35:53-03:00",
- "username": "WS8112000000032._.1"
}, - {
- "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",
- "supported_payment_methods": {
- "card": {
- "networks": [
- "diners",
- "jcb",
- "mastercard",
- "visa"
], - "required_fields": [
- "security_code"
]
}
}, - "updated_at": "2023-02-01T16:36:06-03:00",
- "username": "user@name.com"
}
], - "links": {
}, - "meta": {
- "next_cursor": null,
- "per_page": 25,
- "prev_cursor": null,
- "total": 7
}
}
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: |
invalid_at | null or string <date-time> Time at which the import was marked as invalid. Formatting follows RFC339. Example: |
processed_at | null or string <date-time> Time at which the import was marked as processed. Formatting follows RFC339. Example: |
ready_at | null or string <date-time> Time at which the import was marked as ready. Formatting follows RFC339. Example: |
invalid_rows_count | number Invalid Rows Count |
valid_rows_count | number Valid Rows Count |
rows_count | number Rows Count |
livemode | boolean Has the value |
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: |
updated_at | string <date-time> Time at which the object was last updated. Formatting follows RFC339. Example: |
{- "batch_job": {
- "created_at": "2021-06-08T12:49:06-03:00",
- "failed_jobs": 0,
- "finished_at": "2021-06-08T12:49:06-03:00",
- "pending_jobs": 0,
- "progress": 100,
- "total_jobs": 2
}, - "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:
query Parameters
search | string Example: search=foo@bar.com Search. |
status | string Example: status=ready Allowed values: |
object (range_query_specs) A filter on the list, based on the object | |
ending_before | string A cursor for use in pagination. |
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. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "id": "IMKd7zlGJAna",
- "type": "customers",
- "status": "invalid",
- "livemode": true,
- "rows_count": 2,
- "valid_rows_count": 0,
- "invalid_rows_count": 2,
- "created_at": "2020-11-20T02:38:14-03:00",
- "updated_at": "2020-11-20T02:38:14-03:00",
- "invalid_at": "2020-11-20T02:38:14-03:00"
}, - {
- "id": "IMGdOz9vReVZ",
- "type": "customers",
- "status": "ready",
- "livemode": true,
- "rows_count": 2,
- "valid_rows_count": 2,
- "invalid_rows_count": 0,
- "created_at": "2020-11-20T02:37:48-03:00",
- "updated_at": "2020-11-20T02:37:49-03:00",
- "ready_at": "2020-11-20T02:37:49-03:00"
}
], - "links": {
}, - "meta": {
- "next_cursor": null,
- "per_page": 25,
- "prev_cursor": null,
- "total": 7
}
}
Create a import
Create a import.
Authorizations:
Request Body schema: application/jsonrequired
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{- "type": "customers",
- "filename": "a.csv",
- "original_filename": "a.csv",
- "auto": true
}
Response samples
- 201
- 401
- 422
{- "data": {
- "id": "IM129038120h",
- "batch_job": { },
- "cancelled_at": "2022-02-11T23:19:22-03:00",
- "invalid_at": "2022-02-11T23:19:22-03:00",
- "processed_at": "2022-02-11T23:19:22-03:00",
- "ready_at": "2022-02-11T23:19:22-03:00",
- "invalid_rows_count": 0,
- "valid_rows_count": 0,
- "rows_count": 0,
- "livemode": true,
- "original_filename": "subscriptions-import-template.csv",
- "type": "subscriptions",
- "status": "processed",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}
}
Retrieve a import
Retrieve a import.
Authorizations:
path Parameters
id required | string Example: IMKd7zlGJAna Import ID. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request GET \ --url https://api.debi.pro/v1/imports/IMKd7zlGJAna \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "data": {
- "id": "IM129038120h",
- "batch_job": { },
- "cancelled_at": "2022-02-11T23:19:22-03:00",
- "invalid_at": "2022-02-11T23:19:22-03:00",
- "processed_at": "2022-02-11T23:19:22-03:00",
- "ready_at": "2022-02-11T23:19:22-03:00",
- "invalid_rows_count": 0,
- "valid_rows_count": 0,
- "rows_count": 0,
- "livemode": true,
- "original_filename": "subscriptions-import-template.csv",
- "type": "subscriptions",
- "status": "processed",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}
}
List Import Rows
List Import Rows.
Authorizations:
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 | |
ending_before | string A cursor for use in pagination. |
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. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "id": "IRGdOz9vReVZ",
- "valid": true,
- "data": {
- "name": "Yimi Jendri",
- "email": "yimi@jendri.co",
- "metadata": {
- "dni": 23456789
}
}, - "livemode": false,
- "resource": "customer",
- "resource_id": "CSWVJD6bD5yr",
- "created_at": "2022-01-10T10:00:00-03:00",
- "updated_at": "2022-01-10T10:00:00-03:00"
}, - {
- "id": "IRKd7zlGJAna",
- "valid": true,
- "data": {
- "name": "John Doe",
- "email": "john@doe.co",
- "metadata": {
- "dni": 23789456
}
}, - "livemode": false,
- "resource": "customer",
- "resource_id": "CSbJrDMEDaW9",
- "created_at": "2022-01-10T10:00:00-03:00",
- "updated_at": "2022-01-10T10:00:00-03:00"
}
], - "links": {
}, - "meta": {
- "total": 2730,
- "next_cursor": null,
- "per_page": 1000,
- "prev_cursor": null
}
}
A link is a shareable URL that will take your customers to a hosted page. Links can create manddates, payments, or subscription easily. A link can be shared and used multiple times.
When a customer opens a payment link, the next step will create a new checkout session to render the page. You can use checkout session events to track the results.
id | string Unique identifier for the object. |
uuid | string UUID identifier for the object. [Legacy] |
livemode | boolean Has the value |
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 |
extra_fields | object or null A collection of fields designed to be stored as the metadata of the object that the Session is generating whether it's a Payment, Subscription, or Mandate. This functionality enables you to request extra information from the user during the checkout process, providing a means to store supplementary details about the object in a well-organized format. |
extra_fields_customer | object or null A collection of fields designed to be stored as the metadata of the Customer that the Session is generating. This functionality enables you to request extra information from the user during the checkout process, providing a means to store supplementary details about the object in a well-organized format. |
created_at | string <date-time> Time at which the object was created. Formatting follows RFC339. Example: |
updated_at | string <date-time> Time at which the object was last updated. Formatting follows RFC339. Example: |
deleted_at | null or string <date-time> Time at which the object was deleted. Formatting follows RFC339. Example: |
{- "body": "hoiadsad ad sad",
- "brands": [ ],
- "button_text": null,
- "created_at": "2022-02-02T02:06:22.00-03:00",
- "deleted_at": null,
- "enabled": true,
- "extra_fields": [ ],
- "extra_fields_customer": [ ],
- "id": "LKLj0JV8xzdMoRk549",
- "uuid": "b7fba990-83cc-11ec-8c7b-5b2fd150abb2",
- "kind": "payment",
- "livemode": true,
- "metadata": null,
- "name_text": null,
- "object": "link",
- "options": [
- {
- "amount": "100",
- "count": null,
- "description": "mucho",
- "editable_amount": false,
- "editable_count": false,
- "installments": 1,
- "interval": "1",
- "interval_unit": "monthly",
- "max_installments": null,
- "show_count": false,
- "show_installments": false
}, - {
- "amount": "75",
- "count": null,
- "description": "poco",
- "editable_amount": false,
- "editable_count": false,
- "installments": 1,
- "interval": "1",
- "interval_unit": "monthly",
- "max_installments": null,
- "show_count": false,
- "show_installments": false
}
], - "success_url": null,
- "title": "Test options",
- "updated_at": "2022-02-02T02:06:22.00-03:00",
- "user": {
- "country": "AR",
- "currency": "ARS",
- "email": "pedrolombardo@email.com",
- "organization_name": "Debi",
- "preference_color1": "#ffffff",
- "preference_color2": "#d10000",
}
}
List links
Returns a list of all your links.
Authorizations:
query Parameters
search | string Example: search=foo@bar.com Search. |
object (range_query_specs) A filter on the list, based on the object | |
ending_before | string A cursor for use in pagination. |
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. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request GET \ --url 'https://api.debi.pro/v1/links?search=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
- 200
- 401
{- "data": [
- {
- "id": "string",
- "uuid": "43751655-7580-4bd7-8bad-3c54ed1c4abc",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "extra_fields": [
- {
- "name": "source",
- "type": "select",
- "label": "Cómo nos conociste?",
- "options": {
- "key_1": "Opción 1",
- "key_2": "Opción 2"
}
}, - {
- "name": "age",
- "label": "Edad"
}
], - "extra_fields_customer": [
- {
- "name": "identification_type",
- "type": "select",
- "label": "Tipo de documento",
- "options": {
- "dni": "DNI",
- "cuit": "CUIT",
- "rut": "RUT",
- "cif": "CIF",
- "passport": "Pasaporte"
}
}, - {
- "name": "identification_number",
- "type": "text",
- "label": "Número de documento"
}
], - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500,
- "next_cursor": null,
- "prev_cursor": null
}
}
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/links \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 201
- 401
{- "data": {
- "id": "string",
- "uuid": "43751655-7580-4bd7-8bad-3c54ed1c4abc",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "extra_fields": [
- {
- "name": "source",
- "type": "select",
- "label": "Cómo nos conociste?",
- "options": {
- "key_1": "Opción 1",
- "key_2": "Opción 2"
}
}, - {
- "name": "age",
- "label": "Edad"
}
], - "extra_fields_customer": [
- {
- "name": "identification_type",
- "type": "select",
- "label": "Tipo de documento",
- "options": {
- "dni": "DNI",
- "cuit": "CUIT",
- "rut": "RUT",
- "cif": "CIF",
- "passport": "Pasaporte"
}
}, - {
- "name": "identification_number",
- "type": "text",
- "label": "Número de documento"
}
], - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}
}
Retrieve a link
Retrieve a link.
Authorizations:
path Parameters
id required | string Example: LKLj0JV8xzdMoRk549 Link ID. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request GET \ --url https://api.debi.pro/v1/links/LKLj0JV8xzdMoRk549 \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
{- "data": {
- "id": "string",
- "uuid": "43751655-7580-4bd7-8bad-3c54ed1c4abc",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "extra_fields": [
- {
- "name": "source",
- "type": "select",
- "label": "Cómo nos conociste?",
- "options": {
- "key_1": "Opción 1",
- "key_2": "Opción 2"
}
}, - {
- "name": "age",
- "label": "Edad"
}
], - "extra_fields_customer": [
- {
- "name": "identification_type",
- "type": "select",
- "label": "Tipo de documento",
- "options": {
- "dni": "DNI",
- "cuit": "CUIT",
- "rut": "RUT",
- "cif": "CIF",
- "passport": "Pasaporte"
}
}, - {
- "name": "identification_number",
- "type": "text",
- "label": "Número de documento"
}
], - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}
}
Update a link
Updates a link.
Authorizations:
path Parameters
id required | string Example: LKLj0JV8xzdMoRk549 Link ID. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request PUT \ --url https://api.debi.pro/v1/links/LKLj0JV8xzdMoRk549 \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 422
{- "data": {
- "id": "string",
- "uuid": "43751655-7580-4bd7-8bad-3c54ed1c4abc",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "extra_fields": [
- {
- "name": "source",
- "type": "select",
- "label": "Cómo nos conociste?",
- "options": {
- "key_1": "Opción 1",
- "key_2": "Opción 2"
}
}, - {
- "name": "age",
- "label": "Edad"
}
], - "extra_fields_customer": [
- {
- "name": "identification_type",
- "type": "select",
- "label": "Tipo de documento",
- "options": {
- "dni": "DNI",
- "cuit": "CUIT",
- "rut": "RUT",
- "cif": "CIF",
- "passport": "Pasaporte"
}
}, - {
- "name": "identification_number",
- "type": "text",
- "label": "Número de documento"
}
], - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}
}
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 |
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 |
created_at | string <date-time> Time at which the object was created. Formatting follows RFC339. Example: |
updated_at | string <date-time> Time at which the object was last updated. Formatting follows RFC339. Example: |
deleted_at | null or string <date-time> Time at which the object was deleted. Formatting follows RFC339. Example: |
{- "created_at": "2022-02-01T19:06:37-03:00",
- "customer": {
- "created_at": "2022-02-05T01:42:13-03:00",
- "deleted_at": null,
- "email": "john@doe.com",
- "gateway_identifier": "383473",
- "id": "CSnlZxyY3jwr",
- "identification_number": null,
- "identification_type": null,
- "livemode": true,
- "metadata": null,
- "mobile_number": "5491154876503",
- "name": "John Doe",
- "updated_at": "2022-02-05T01:42:13-03:00"
}, - "deleted_at": null,
- "id": "MA9aQOWen2kZe6qypB",
- "uuid": "3990a740-83ab-11ec-8651-cde6203c968e",
- "livemode": true,
- "metadata": {
- "dni": "1231232131"
}, - "object": "mandate",
- "payment_method": {
- "card": {
- "name": "Visa",
- "network": "visa",
- "issuer": null,
- "country": "AR",
- "expiration_month": null,
- "expiration_year": null,
- "fingerprint": "0sZQikKp4lImAgIo",
- "funding": "credit",
- "last_four_digits": "4242",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "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"
}, - "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:
query Parameters
all | boolean Include archived mandates. |
customer_id | |
object (range_query_specs) A filter on the list, based on the object | |
ending_before | string A cursor for use in pagination. |
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. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "id": "MAmQ6j9NWxblNv",
- "status": "active",
- "uuid": "43751655-7580-4bd7-8bad-3c54ed1c4abc",
- "object": "mandate",
- "livemode": true,
- "customer": {
- "id": "CSljikas98",
- "name": "Jorgelina Castro",
- "email": "mail@example.com",
- "object": "customer",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "mobile_number": "5491164531234",
- "default_payment_method_id": "PMBja4YZ2GDR.",
- "gateway_identifier": "383473",
- "identification_number": "15.555.324",
- "identification_type": "DNI",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}, - "payment_method": {
- "id": "PMyma6Ql8Wo9",
- "object": "payment_method",
- "type": "card",
- "card": {
- "country": "AR",
- "expiration_month": 11,
- "expiration_year": 2030,
- "fingerprint": "8712yh2uihiu1123sxas",
- "funding": "credit",
- "issuer": "argencard",
- "last_four_digits": "9876",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "sepa_debit": {
- "bank": "string",
- "country": "NL",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "santander-es"
], - "preferred": [
- "santander-es"
]
}
}, - "cbu": {
- "bank": "string",
- "country": "AR",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "cbu-galicia"
], - "preferred": "cbu-galicia"
}
}, - "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}, - "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500,
- "next_cursor": null,
- "prev_cursor": null
}
}
Create a mandate
Create a mandate.
Authorizations:
Request Body schema: application/jsonoptional
customer_id | string |
payment_method_id | string |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{- "customer_id": "CS3oDRqz9wzB",
- "payment_method_id": "PMBja4YZ2GDR"
}
Response samples
- 201
- 401
{- "data": {
- "id": "3d48eb80-a5a3-11ea-8439-bdd053d1a65b",
- "object": "mandate",
- "livemode": true,
- "status": "active",
- "created_at": "2020-06-03T11:05:11-03:00",
- "updated_at": "2020-06-03T11:05:11-03:00",
- "customer": {
- "id": "CS3oDRqz9wzB",
- "object": "customer",
- "gateway_identifier": "1234",
- "name": "John",
- "email": "john@doe.com",
- "identification_type": "",
- "identification_number": "",
- "mobile_number": "",
- "livemode": true,
- "updated_at": "2020-06-03T11:05:11-03:00",
- "created_at": "2020-06-03T11:05:11-03:00"
}, - "payment_method": {
- "card": {
- "name": "Visa",
- "network": "visa",
- "issuer": null,
- "country": "AR",
- "expiration_month": null,
- "expiration_year": null,
- "fingerprint": "0sZQikKp4lImAgIo",
- "funding": "credit",
- "last_four_digits": "4242",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "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"
}
}
}
Retrieve a mandate
Retrieve a mandate.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request GET \ --url https://api.debi.pro/v1/mandates/MA9aQOWen2kZe6qypB \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "data": {
- "id": "MAmQ6j9NWxblNv",
- "status": "active",
- "uuid": "43751655-7580-4bd7-8bad-3c54ed1c4abc",
- "object": "mandate",
- "livemode": true,
- "customer": {
- "id": "CSljikas98",
- "name": "Jorgelina Castro",
- "email": "mail@example.com",
- "object": "customer",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "mobile_number": "5491164531234",
- "default_payment_method_id": "PMBja4YZ2GDR.",
- "gateway_identifier": "383473",
- "identification_number": "15.555.324",
- "identification_type": "DNI",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}, - "payment_method": {
- "id": "PMyma6Ql8Wo9",
- "object": "payment_method",
- "type": "card",
- "card": {
- "country": "AR",
- "expiration_month": 11,
- "expiration_year": 2030,
- "fingerprint": "8712yh2uihiu1123sxas",
- "funding": "credit",
- "issuer": "argencard",
- "last_four_digits": "9876",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "sepa_debit": {
- "bank": "string",
- "country": "NL",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "santander-es"
], - "preferred": [
- "santander-es"
]
}
}, - "cbu": {
- "bank": "string",
- "country": "AR",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "cbu-galicia"
], - "preferred": "cbu-galicia"
}
}, - "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}, - "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}
}
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:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/mandates/MA9aQOWen2kZe6qypB/actions/revoke \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 401
{- "data": {
- "message": "Unauthorized"
}
}
Restore mandate
This action will restore the revoked mandate.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/mandates/MA9aQOWen2kZe6qypB/actions/restore \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 401
{- "data": {
- "message": "Unauthorized"
}
}
Search mandates
Search mandates.
Authorizations:
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
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "created_at": "2022-02-01T19:06:37-03:00",
- "customer": {
- "created_at": "2022-02-05T01:42:13-03:00",
- "deleted_at": null,
- "email": "john@doe.com",
- "gateway_identifier": "383473",
- "id": "CSnlZxyY3jwr",
- "identification_number": null,
- "identification_type": null,
- "livemode": true,
- "metadata": null,
- "mobile_number": "5491154876503",
- "name": "John Doe",
- "object": "customer",
- "updated_at": "2022-02-05T01:42:13-03:00"
}, - "deleted_at": null,
- "id": "MA9aQOWen2kZe6qypB",
- "uuid": "3990a740-83ab-11ec-8651-cde6203c968e",
- "livemode": true,
- "metadata": {
- "dni": "1231232131"
}, - "object": "mandate",
- "payment_method": {
- "card": {
- "name": "Visa",
- "network": "visa",
- "issuer": null,
- "country": "AR",
- "expiration_month": null,
- "expiration_year": null,
- "fingerprint": "0sZQikKp4lImAgIo",
- "funding": "credit",
- "last_four_digits": "4242",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "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"
}, - "status": "active",
- "updated_at": "2022-02-01T19:06:37-03:00"
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500
}
}
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" "sepa_debit" "cbu" Type of payment method. One of: |
object (Credit Card) This object represents a credit card of your account. | |
object (CBU) This object represents a SEPA Debit used to debit bank accounts within the Single Euro Payments Area (SEPA) region. | |
object (CBU) This object represents a CBU bank account of your account. | |
livemode | boolean Has the value |
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 |
created_at | string <date-time> Time at which the object was created. Formatting follows RFC339. Example: |
updated_at | string <date-time> Time at which the object was last updated. Formatting follows RFC339. Example: |
{- "card": {
- "name": "Visa",
- "network": "visa",
- "issuer": null,
- "country": "AR",
- "expiration_month": null,
- "expiration_year": null,
- "fingerprint": "0sZQikKp4lImAgIo",
- "funding": "credit",
- "last_four_digits": "4242",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "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:
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
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "type": "card",
- "card": {
- "name": "Visa",
- "network": "visa",
- "country": "AR",
- "issuer": null,
- "fingerprint": "782uy3h1983gy7sl",
- "last_four_digits": "1481",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "created_at": "2019-01-28T15:27:29-03:00",
- "id": "PMVdYaYwkqOw",
- "livemode": true,
- "object": "payment_method",
- "updated_at": "2019-05-23T20:30:01-03:00"
}
], - "links": {
- "first": null,
- "last": null,
},
}
Create a payment method
Create a payment method
Authorizations:
Request Body schema: application/jsonoptional
type | string Enum: "card" "sepa_debit" "cbu" One of |
object (Card) This object represents a card of your account. | |
object (CBU) This object represents a CBU bank account of your account. | |
object (Sepa Debit (Iban)) This object represents a direct debit to a IBAN account for the SEPA Region. | |
strict | boolean If true, the payment_method won't be created if the account doesn't have an available gateway to process this type of payment_method. |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{- "type": "card",
- "card": {
- "number": "4242424242424242",
- "expiration_year": 2032,
- "expiration_month": 5,
- "security_code": "123"
}, - "strict": true
}
Response samples
- 201
- 401
- 422
{- "data": {
- "card": {
- "country": "AR",
- "expiration_month": null,
- "expiration_year": null,
- "fingerprint": "0sZQikKp4lImAgIo",
- "issuer": null,
- "funding": "credit",
- "last_four_digits": "4242",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "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"
}
}
Retrieve a payment method
Retrieve a payment method.
Authorizations:
path Parameters
id required | string Example: PMVA0W8y1aQO Payment method ID. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request GET \ --url https://api.debi.pro/v1/payment_methods/PMVA0W8y1aQO \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "data": {
- "id": "PMyma6Ql8Wo9",
- "object": "payment_method",
- "type": "card",
- "card": {
- "country": "AR",
- "expiration_month": 11,
- "expiration_year": 2030,
- "fingerprint": "8712yh2uihiu1123sxas",
- "funding": "credit",
- "issuer": "argencard",
- "last_four_digits": "9876",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "sepa_debit": {
- "bank": "string",
- "country": "NL",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "santander-es"
], - "preferred": [
- "santander-es"
]
}
}, - "cbu": {
- "bank": "string",
- "country": "AR",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "cbu-galicia"
], - "preferred": "cbu-galicia"
}
}, - "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}
}
Search payment methods
Search payment methods.
Authorizations:
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
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "card": {
- "name": "Visa",
- "network": "visa",
- "issuer": null,
- "country": "AR",
- "expiration_month": null,
- "expiration_year": null,
- "fingerprint": "0sZQikKp4lImAgIo",
- "funding": "credit",
- "last_four_digits": "4242",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "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"
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500
}
}
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 |
created_at | string <date-time> Time at which the object was created. Formatting follows RFC339. Example: |
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: |
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 |
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 |
{- "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": {
- "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": {
- "external_id": "0Qk3IJY5"
}, - "livemode": true,
- "created_at": "2021-07-05T12:24:32-03:00",
- "updated_at": "2021-07-05T12:24:32-03:00",
- "deleted_at": null
}, - "subscription": null,
- "subscription_payment_number": null,
- "gateway": "GW1L49J7ARW3",
- "payment_method": {
- "card": {
- "name": "Visa",
- "network": "visa",
- "issuer": null,
- "country": "AR",
- "expiration_month": null,
- "expiration_year": null,
- "fingerprint": "0sZQikKp4lImAgIo",
- "funding": "credit",
- "last_four_digits": "4242",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "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"
}, - "gateway_identifier": null,
- "metadata": null,
- "refunds": [ ]
}
List payments
Newest payments will be first on the list.
Authorizations:
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 | |
ending_before | string A cursor for use in pagination. |
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. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
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
- 200
- 401
{- "data": [
- {
- "id": "PYljikas9Fa8",
- "object": "payment",
- "amount": 12.5,
- "amount_refunded": 0,
- "currency": "ARS",
- "description": "Ajuste por deuda pasada",
- "status": "rejected",
- "response_message": "Falta de fondos",
- "paid": false,
- "retryable": true,
- "refundable": false,
- "amount_refundable": 0,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "charge_date": "2022-08-04",
- "submissions_count": 1,
- "can_auto_retry_until": "2022-08-31",
- "auto_retries_max_attempts": null,
- "effective_charged_date": null,
- "estimated_accreditation_date": null,
- "updated_at": "2022-02-11T23:19:22-03:00",
- "updated_status": "2022-08-31",
- "customer": {
- "id": "CSljikas98",
- "name": "Jorgelina Castro",
- "email": "mail@example.com",
- "object": "customer",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "mobile_number": "5491164531234",
- "default_payment_method_id": "PMBja4YZ2GDR.",
- "gateway_identifier": "383473",
- "identification_number": "15.555.324",
- "identification_type": "DNI",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}, - "subscription": "SBmX1MrZ77Mwq3",
- "subscription_payment_number": null,
- "gateway": "GW1L49J7ARW3",
- "payment_method": {
- "id": "PMyma6Ql8Wo9",
- "object": "payment_method",
- "type": "card",
- "card": {
- "country": "AR",
- "expiration_month": 11,
- "expiration_year": 2030,
- "fingerprint": "8712yh2uihiu1123sxas",
- "funding": "credit",
- "issuer": "argencard",
- "last_four_digits": "9876",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "sepa_debit": {
- "bank": "string",
- "country": "NL",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "santander-es"
], - "preferred": [
- "santander-es"
]
}
}, - "cbu": {
- "bank": "string",
- "country": "AR",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "cbu-galicia"
], - "preferred": "cbu-galicia"
}
}, - "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}, - "gateway_identifier": null,
- "binary_mode": true,
- "refunds": [ ],
- "metadata": {
- "some": "metadata"
}
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500,
- "next_cursor": null,
- "prev_cursor": null
}
}
Create a payment
Create a payment.
Authorizations:
Request Body schema: application/jsonoptional
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 |
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{- "amount": 100,
- "description": "Unique payment",
- "gateway_identifier": "001234",
- "customer_id": "CSr7Dg3LkDP2",
- "payment_method_id": "PMBja4YZ2GDR"
}
Response samples
- 201
- 401
{- "data": {
- "id": "PYljikas9Fa8",
- "object": "payment",
- "amount": 12.5,
- "amount_refunded": 0,
- "currency": "ARS",
- "description": "Ajuste por deuda pasada",
- "status": "rejected",
- "response_message": "Falta de fondos",
- "paid": false,
- "retryable": true,
- "refundable": false,
- "amount_refundable": 0,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "charge_date": "2022-08-04",
- "submissions_count": 1,
- "can_auto_retry_until": "2022-08-31",
- "auto_retries_max_attempts": null,
- "effective_charged_date": null,
- "estimated_accreditation_date": null,
- "updated_at": "2022-02-11T23:19:22-03:00",
- "updated_status": "2022-08-31",
- "customer": {
- "id": "CSljikas98",
- "name": "Jorgelina Castro",
- "email": "mail@example.com",
- "object": "customer",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "mobile_number": "5491164531234",
- "default_payment_method_id": "PMBja4YZ2GDR.",
- "gateway_identifier": "383473",
- "identification_number": "15.555.324",
- "identification_type": "DNI",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}, - "subscription": "SBmX1MrZ77Mwq3",
- "subscription_payment_number": null,
- "gateway": "GW1L49J7ARW3",
- "payment_method": {
- "id": "PMyma6Ql8Wo9",
- "object": "payment_method",
- "type": "card",
- "card": {
- "country": "AR",
- "expiration_month": 11,
- "expiration_year": 2030,
- "fingerprint": "8712yh2uihiu1123sxas",
- "funding": "credit",
- "issuer": "argencard",
- "last_four_digits": "9876",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "sepa_debit": {
- "bank": "string",
- "country": "NL",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "santander-es"
], - "preferred": [
- "santander-es"
]
}
}, - "cbu": {
- "bank": "string",
- "country": "AR",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "cbu-galicia"
], - "preferred": "cbu-galicia"
}
}, - "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}, - "gateway_identifier": null,
- "binary_mode": true,
- "refunds": [ ],
- "metadata": {
- "some": "metadata"
}
}
}
Retrieve a payment
Retrieve a payment.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request GET \ --url https://api.debi.pro/v1/payments/PYdOz9bgVReV \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "data": {
- "id": "PYljikas9Fa8",
- "object": "payment",
- "amount": 12.5,
- "amount_refunded": 0,
- "currency": "ARS",
- "description": "Ajuste por deuda pasada",
- "status": "rejected",
- "response_message": "Falta de fondos",
- "paid": false,
- "retryable": true,
- "refundable": false,
- "amount_refundable": 0,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "charge_date": "2022-08-04",
- "submissions_count": 1,
- "can_auto_retry_until": "2022-08-31",
- "auto_retries_max_attempts": null,
- "effective_charged_date": null,
- "estimated_accreditation_date": null,
- "updated_at": "2022-02-11T23:19:22-03:00",
- "updated_status": "2022-08-31",
- "customer": {
- "id": "CSljikas98",
- "name": "Jorgelina Castro",
- "email": "mail@example.com",
- "object": "customer",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "mobile_number": "5491164531234",
- "default_payment_method_id": "PMBja4YZ2GDR.",
- "gateway_identifier": "383473",
- "identification_number": "15.555.324",
- "identification_type": "DNI",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}, - "subscription": "SBmX1MrZ77Mwq3",
- "subscription_payment_number": null,
- "gateway": "GW1L49J7ARW3",
- "payment_method": {
- "id": "PMyma6Ql8Wo9",
- "object": "payment_method",
- "type": "card",
- "card": {
- "country": "AR",
- "expiration_month": 11,
- "expiration_year": 2030,
- "fingerprint": "8712yh2uihiu1123sxas",
- "funding": "credit",
- "issuer": "argencard",
- "last_four_digits": "9876",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "sepa_debit": {
- "bank": "string",
- "country": "NL",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "santander-es"
], - "preferred": [
- "santander-es"
]
}
}, - "cbu": {
- "bank": "string",
- "country": "AR",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "cbu-galicia"
], - "preferred": "cbu-galicia"
}
}, - "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}, - "gateway_identifier": null,
- "binary_mode": true,
- "refunds": [ ],
- "metadata": {
- "some": "metadata"
}
}
}
Update a payment
Update a payment.
Authorizations:
path Parameters
id required |
Request Body schema: application/jsonrequired
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{- "description": "New payment title"
}
Response samples
- 200
- 401
{- "data": {
- "id": "PYljikas9Fa8",
- "object": "payment",
- "amount": 12.5,
- "amount_refunded": 0,
- "currency": "ARS",
- "description": "Ajuste por deuda pasada",
- "status": "rejected",
- "response_message": "Falta de fondos",
- "paid": false,
- "retryable": true,
- "refundable": false,
- "amount_refundable": 0,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "charge_date": "2022-08-04",
- "submissions_count": 1,
- "can_auto_retry_until": "2022-08-31",
- "auto_retries_max_attempts": null,
- "effective_charged_date": null,
- "estimated_accreditation_date": null,
- "updated_at": "2022-02-11T23:19:22-03:00",
- "updated_status": "2022-08-31",
- "customer": {
- "id": "CSljikas98",
- "name": "Jorgelina Castro",
- "email": "mail@example.com",
- "object": "customer",
- "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "mobile_number": "5491164531234",
- "default_payment_method_id": "PMBja4YZ2GDR.",
- "gateway_identifier": "383473",
- "identification_number": "15.555.324",
- "identification_type": "DNI",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00"
}, - "subscription": "SBmX1MrZ77Mwq3",
- "subscription_payment_number": null,
- "gateway": "GW1L49J7ARW3",
- "payment_method": {
- "id": "PMyma6Ql8Wo9",
- "object": "payment_method",
- "type": "card",
- "card": {
- "country": "AR",
- "expiration_month": 11,
- "expiration_year": 2030,
- "fingerprint": "8712yh2uihiu1123sxas",
- "funding": "credit",
- "issuer": "argencard",
- "last_four_digits": "9876",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina"
], - "preferred": "fiserv-argentina"
}
}, - "sepa_debit": {
- "bank": "string",
- "country": "NL",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "santander-es"
], - "preferred": [
- "santander-es"
]
}
}, - "cbu": {
- "bank": "string",
- "country": "AR",
- "fingerprint": "8712yh2uihiu1123sxas",
- "identification": { },
- "last_four_digits": "9876",
- "providers": {
- "available": [
- "cbu-galicia"
], - "preferred": "cbu-galicia"
}
}, - "livemode": true,
- "metadata": {
- "some": "metadata"
}, - "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00"
}, - "gateway_identifier": null,
- "binary_mode": true,
- "refunds": [ ],
- "metadata": {
- "some": "metadata"
}
}
}
Cancel payment
Cancel payment.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/payments/PYdOz9bgVReV/actions/cancel \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 201
- 401
{- "message": "Cancelled successfully"
}
Retry a payment
Retry a payment.
Authorizations:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/payments/PYdOz9bgVReV/actions/retry \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 201
- 401
{- "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:
path Parameters
id required |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/payments/PYdOz9bgVReV/actions/stop_auto_retrying \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 201
- 401
{- "message": "Stopped autoretries successfully"
}
Search payments
Search payments.
Authorizations:
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. |