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. |
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/search?q=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&page=SOME_STRING_VALUE' \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
{- "data": [
- {
- "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": [ ]
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500
}
}
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: |
updated_at | string <date-time> Time at which the object was last updated. Formatting follows RFC339. Example: |
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": "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:
query Parameters
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/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
- 200
- 401
{- "data": [
- {
- "id": "RFljikas9Fa8",
- "object": "refund",
- "payment_id": "PYgaZlLaPMZO",
- "amount": 12.5,
- "currency": "ARS",
- "reason": "requested_by_customer",
- "status": "approved",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "metadata": {
- "some": "metadata"
}
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500,
- "next_cursor": null,
- "prev_cursor": null
}
}
Create a refund
Create a refund.
Authorizations:
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 |
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
{- "payment_id": "PYgaZlLaPMZO.",
- "amount": 12.5,
- "reason": "requested_by_customer",
- "metadata": {
- "some": "metadata"
}
}
Response samples
- 201
- 401
- 422
{- "data": {
- "id": "RFljikas9Fa8",
- "object": "refund",
- "payment_id": "PYgaZlLaPMZO",
- "amount": 12.5,
- "currency": "ARS",
- "reason": "requested_by_customer",
- "status": "approved",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "metadata": {
- "some": "metadata"
}
}
}
Retrieve a refund
Retrieve a refund.
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/refunds/RFgaZlLaPMZO \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "data": {
- "id": "RFljikas9Fa8",
- "object": "refund",
- "payment_id": "PYgaZlLaPMZO",
- "amount": 12.5,
- "currency": "ARS",
- "reason": "requested_by_customer",
- "status": "approved",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "metadata": {
- "some": "metadata"
}
}
}
Sessions enable you to use Debi's hosted payment pages to set up mandates, subscriptions or payments with your customers.
First you create a Session for your customer, and redirect them to the returned redirect url. Your customer supplies their name, email, address, and bank account or card details, and submits the form. This securely stores their details, and redirects them back to your back_url
with session_id=THE_SESSION_ID
in the querystring.
You complete the Session, which creates a customer, payment method, and either payment, mandate or subscription, and returns the ID of the session. With this data you may wish to create a subscription or payment at this point.
Once you have completed the Session via the API, you should display a confirmation page to your customer, confirming that data has been set up. You can build your own page, or redirect to the one we provide in the confirmation_url
attribute of the Session.
Session expire after completed. You cannot complete an expired or already completed Session.
id | string Unique identifier for the Session. |
uuid | string UUID identifier for the object. [Legacy] |
object | string Value: "session" |
description | string Session description |
amount | number Amount to be collected. |
kind | string Enum: "mandate" "payment" "subscription" |
customer_id | string Unique identifier for the Customer. |
customer_name | null or string The customer's full name or business name. |
customer_email | null or string The customer's email address. |
customer_gateway_identifier | null or string The customer's reference for bank account statements. |
editable_amount | boolean Allow the customer to set the amount, useful for donations. |
installments | integer Only for payments, quantity of payments on which the amount will be splitted. |
max_installments | integer Only for payments, allow the customer to choose how many installments can split the payment. |
interval_unit | string Only for subscriptions. The unit of time between customer charge dates. One of |
interval | number Only for subscriptions. Number of |
day_of_month | number Day of month, from 1 to 28. This field is required if interval_unit is set to monthly. Defaults to 1. |
day_of_week | number Day of week number, from 0 (Sunday) to 6 (Saturday). This field is required if |
count | number |
editable_count | boolean |
name_text | string |
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: |
completed_at | string <date-time> Time at which the sessions was completed. Formatting follows RFC339. Example: |
deleted_at | null or string <date-time> Time at which the object was deleted. Formatting follows RFC339. Example: |
livemode | boolean Has the value |
binary_mode | boolean Forces instantaneous payment processing, providing an immediate status of either |
payment_gateway_identifier | null or string The custom number you send to the gateway network. In most cases this value is null. |
public_uri | string The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. |
success_url | string The uri on which your customer will be redirected after completing the checkout. |
link_id | string Link ID. |
{- "amount": "100.00",
- "brands": [ ],
- "completed_at": null,
- "count": null,
- "created_at": "2022-02-11T23:17:54.00-03:00",
- "customer_email": null,
- "customer_id": null,
- "customer_name": null,
- "day_of_month": null,
- "day_of_week": null,
- "deleted_at": null,
- "description": "mucho",
- "editable_amount": false,
- "editable_count": false,
- "extra_fields": [ ],
- "extra_fields_customer": [ ],
- "id": "SSnO8b9w7B51VE0B5m",
- "uuid": "d6fe7bf0-8b90-11ec-9bb7-ad20fd301d81",
- "installments": 1,
- "interval": 1,
- "interval_unit": "monthly",
- "kind": "payment",
- "link_id": "b7fba990-83cc-11ec-8c7b-5b2fd150abb2",
- "livemode": true,
- "max_installments": null,
- "name_text": null,
- "object": "session",
- "updated_at": "2022-02-11T23:17:55.00-03:00",
- "user": {
- "country": "AR",
- "currency": "ARS",
- "email": "pedrolombardo@email.com",
- "organization_name": "Debi",
- "preference_color1": "#ffffff",
- "preference_color2": "#d10000",
}
}
Create a sesssion
Create a session
Authorizations:
Request Body schema: application/jsonoptional
kind | string Enum: "payment" "subscription" "mandate" One of payment, subscription or mandate. |
success_url | string The uri on which your customer will be redirected after completing the checkout. |
amount | string The amount of the payment or subscription. |
description | string The title of the payment or subscription. |
customer_id | string |
customer_name | string Name of your customer. You can fill it or ask the customer to fill this field in the checkout process. |
customer_email | string Email of your customer. You can fill it or ask the customer to fill this field in the checkout process. |
customer_gateway_identifier | null or string The customer's reference for bank account statements. |
editable_amount | boolean Allow the customer to set the amount, useful for donations. |
installments | integer Only for payments, quantity of payments on which the amount will be splitted. |
max_installments | integer Only for payments, allow the customer to choose how many installments can split the payment. |
interval_unit | string Enum: "weekly" "monthly" "yearly" Only for subscriptions, the unit of time between customer charge dates. One of weekly, monthly or yearly. |
interval | integer Only for subscriptions, the number of interval_units between customer charge dates. Must be greater than to 1. If interval_unit is weekly and interval is 2, then the customer will be charged every two weeks. Defaults to 1. |
day_of_month | integer Only for subscriptions, the day of month, from 1 to 28. Use only if you need the subscription to start in a specyfic date. In most cases this should be null, therefore Debi will use the date of the moment when the user completes the checkout. |
day_of_week | integer Only for subscriptions, the day of week number, from 0 (Sunday) to 6 (Saturday). Use only if you need the subscription to start in a specyfic date. In most cases this should be null, therefore Debi will use the date of the moment when the user completes the checkout. |
payment_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 |
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. |
count | integer Only for subscriptions, the total number of payments that should be taken by this subscription. If not specified the subscription will continue until you cancel it. |
editable_count | number Only for subscriptions, allow the customer to set the duration of the subscriptions, useful for donations. |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{- "kind": "payment",
- "amount": "200.50",
- "description": "Summer school"
}
Response samples
- 201
- 401
- 422
{- "data": {
- "id": "SSmQ6j9NWxblNv",
- "uuid": "43751655-7580-4bd7-8bad-3c54ed1c4abc",
- "object": "session",
- "description": "Ajuste por deuda pasada",
- "amount": 12.5,
- "kind": "mandate",
- "customer_id": "CSljikas98",
- "customer_name": "Jorgelina Castro",
- "customer_email": "mail@example.com",
- "customer_gateway_identifier": "383473",
- "editable_amount": true,
- "installments": 0,
- "max_installments": 0,
- "interval_unit": "string",
- "interval": 0,
- "day_of_month": 0,
- "day_of_week": 0,
- "count": 0,
- "editable_count": true,
- "name_text": "string",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "completed_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00",
- "livemode": true,
- "binary_mode": true,
- "payment_gateway_identifier": null,
- "public_uri": "string",
- "success_url": "string",
- "link_id": "LKLj0JV8xzdMoRk549"
}
}
Retrieve a session
Retrieve a session.
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/sessions/SSnO8b9w7B51VE0B5m \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 201
- 401
- 404
{- "data": {
- "id": "SSmQ6j9NWxblNv",
- "uuid": "43751655-7580-4bd7-8bad-3c54ed1c4abc",
- "object": "session",
- "description": "Ajuste por deuda pasada",
- "amount": 12.5,
- "kind": "mandate",
- "customer_id": "CSljikas98",
- "customer_name": "Jorgelina Castro",
- "customer_email": "mail@example.com",
- "customer_gateway_identifier": "383473",
- "editable_amount": true,
- "installments": 0,
- "max_installments": 0,
- "interval_unit": "string",
- "interval": 0,
- "day_of_month": 0,
- "day_of_week": 0,
- "count": 0,
- "editable_count": true,
- "name_text": "string",
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "completed_at": "2022-02-11T23:19:22-03:00",
- "deleted_at": "2022-02-11T23:19:22-03:00",
- "livemode": true,
- "binary_mode": true,
- "payment_gateway_identifier": null,
- "public_uri": "string",
- "success_url": "string",
- "link_id": "LKLj0JV8xzdMoRk549"
}
}
Subscriptions allow you to charge a customer on a recurring basis according to a schedule.
Status | Meaning |
---|---|
active |
The subscription is active and generating payments. |
paused |
The subscription have been manually paused and won't generate payments until is resumed. |
cancelled |
The subscription have been manually cancelled. |
finished |
The subscription is completed: all the payments were created succesfully. |
id required | string Unique identifier for the Subscription. |
object required | string Value: "subscription" |
amount required | number Subscription amount |
description required | string Subscription description |
currency required | string Enum: "ARS" "BRL" "CLP" "COP" "MXN" "USB" "USD" Currency for the transacion using ISO_4217 codes. Defaults to account's default. |
status required | string Enum: "active" "paused" "cancelled" "finished" Subscription Status |
count required | null or number The total number of payments that should be taken by this subscription. |
start_date required | string A future date on which the first payment of the subscription should be collected. |
interval_unit required | string Enum: "weekly" "monthly" "yearly" The unit of time between customer charge dates. |
interval required | number Number of |
day_of_month required | number Day of month, from 1 to 28. This field is required if |
day_of_week required | null or number Day of week number, from 0 (Sunday) to 6 (Saturday). This field is required if |
livemode required | boolean Has the value |
created_at required | 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: |
auto_retries_max_attempts required | null or number The maximum number of times the payments from this subscription could be automatically retried. |
first_date required | string The date on which the first payment should be charged. When left blank and month or day_of_month are provided, this will be set to the date of the first payment. If created without month or day_of_month this will be set as soon as possible. |
upcoming_dates required | Array of strings Up to 5 upcoming payments charge dates. |
required | object (Customer) This object represents a customer of your organization. |
required | object (Payment Method) This object represents a payment method of your account. |
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 |
{- "id": "SBmQ6j9NWxblNv",
- "object": "subscription",
- "amount": 5200,
- "description": "Cuota mensual",
- "currency": "ARS",
- "status": "active",
- "count": null,
- "start_date": "2021-07-01",
- "interval_unit": "monthly",
- "interval": 1,
- "day_of_month": 1,
- "day_of_week": 1,
- "livemode": true,
- "created_at": "2021-07-01T12:24:32-03:00",
- "updated_at": "2021-07-01T12:24:32-03:00",
- "first_date": "2022-09-01",
- "upcoming_dates": [
- "2022-09-01",
- "2022-10-01",
- "2022-11-01",
- "2022-12-01",
- "2023-01-01"
], - "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
}, - "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"
}, - "metadata": null
}
List all subscriptions
By default newest subscriptions will be first on the list.
Authorizations:
query Parameters
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/subscriptions?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": "SBmQ6j9NWxblNv",
- "object": "subscription",
- "amount": 12.5,
- "description": "Ajuste por deuda pasada",
- "currency": "ARS",
- "status": "active",
- "count": 12,
- "start_date": "2022-08-04",
- "interval_unit": "monthly",
- "interval": 1,
- "day_of_month": 0,
- "day_of_week": null,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "auto_retries_max_attempts": null,
- "first_date": "2022-08-04",
- "upcoming_dates": [
- "2022-09-04",
- "2022-10-04",
- "2022-11-04",
- "2022-12-04",
- "2023-01-04"
], - "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"
}
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500,
- "next_cursor": null,
- "prev_cursor": null
}
}
Create a subscription
Create a subscription
Authorizations:
Request Body schema: application/jsonoptional
amount required | number The amount of each payment of the subscription. |
description required | string <= 255 characters The description of each payment of the subscription. |
count | number The total number of payments that should be taken by this subscription. If not specified the subscription will continue until you cancel it. |
customer_id required | string |
payment_method_id | string Payment Method ID. This field is required if
|
start_date | string A future date on which the first payment of the subscription should be collected. If not specified, the first payment will be collected as soon as possible. |
interval_unit required | string The unit of time between customer charge dates. One of |
interval | number Number of |
day_of_month | number Day of month, from 1 to 28. This field is required if |
day_of_week | number Day of week number, from 0 (Sunday) to 6 (Saturday). This field is required if |
auto_retries_max_attempts | null or number The maximum number of times the payments from this subscription could be automatically retried. |
first_payment_in_binary_mode | boolean Forces instantaneous payment processing for the first payment of the subscription. This provides 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": "Some subscription description",
- "customer_id": "CS9PL8eeo8aB",
- "payment_method_id": "PMBja4YZ2GDR",
- "interval_unit": "monthly",
- "day_of_month": 1,
- "metadata": {
- "some": "metadata"
}
}
Response samples
- 201
- 401
- 422
{- "data": {
- "amount": 100,
- "auto_retries_max_attempts": null,
- "count": null,
- "created_at": "2023-02-27T12:11:18-03:00",
- "currency": "ARS",
- "customer": {
- "created_at": "2023-02-27T12:10:11-03:00",
- "default_payment_method_id": null,
- "deleted_at": null,
- "email": null,
- "gateway_identifier": "290",
- "id": "CSbJrDMpVwaW",
- "identification_number": null,
- "identification_type": null,
- "livemode": false,
- "metadata": null,
- "mobile_number": null,
- "name": null,
- "object": "customer",
- "updated_at": "2023-02-27T12:10:11-03:00"
}, - "day_of_month": 1,
- "day_of_week": null,
- "description": "My Subscription",
- "first_date": "2023-03-01",
- "id": "SBJ843BlLBbd5Y",
- "interval": 1,
- "interval_unit": "monthly",
- "livemode": false,
- "metadata": null,
- "object": "subscription",
- "payment_method": {
- "card": {
- "country": "AR",
- "expiration_month": 12,
- "expiration_year": 2030,
- "fingerprint": "spnkdn504cBwsJbN",
- "funding": "debit",
- "issuer": null,
- "last_four_digits": "4905",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina",
- "mercado-pago",
- "payway",
- "wompi"
], - "preferred": "fiserv-argentina"
}
}, - "created_at": "2023-02-27T12:09:59-03:00",
- "id": "PMVExkx45kMK",
- "livemode": false,
- "metadata": null,
- "object": "payment_method",
- "type": "card",
- "updated_at": "2023-02-27T12:09:59-03:00"
}, - "start_date": "2023-02-27",
- "status": "active",
- "upcoming_dates": [
- "2023-03-01",
- "2023-04-01",
- "2023-05-01",
- "2023-06-01",
- "2023-07-01"
], - "updated_at": "2023-02-27T12:11:18-03:00"
}
}
Retrieve a subscription
Retrieve a subscription.
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/subscriptions/SBmX1MrZ77Mwq3 \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
- 404
{- "data": {
- "id": "SBmQ6j9NWxblNv",
- "object": "subscription",
- "amount": 12.5,
- "description": "Ajuste por deuda pasada",
- "currency": "ARS",
- "status": "active",
- "count": 12,
- "start_date": "2022-08-04",
- "interval_unit": "monthly",
- "interval": 1,
- "day_of_month": 0,
- "day_of_week": null,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "auto_retries_max_attempts": null,
- "first_date": "2022-08-04",
- "upcoming_dates": [
- "2022-09-04",
- "2022-10-04",
- "2022-11-04",
- "2022-12-04",
- "2023-01-04"
], - "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"
}
}
}
Update a subscription
Update a subscription.
Authorizations:
path Parameters
id required | string Example: SBmX1MrZ77Mwq3 Subscription ID. |
Request Body schema: application/jsonoptional
amount | number The amount of each payment of the subscription. |
description | string <= 255 characters The title of each payment of the subscription. |
count | number The total number of payments that should be taken by this subscription. If not specified the subscription will continue until you cancel it. |
customer_id | string |
payment_method_id | string The Payment Method ID for each payment of the
subscription. This field is required if |
start_date | string A future date on which the first payment of the subscription should be collected. If not specified, the first payment will be collected as soon as possible. |
interval_unit | string The unit of time between customer charge dates. One of weekly, monthly or yearly. Example monthly |
interval | number Number of interval_units between customer charge dates. Must be greater than to 1. If interval_unit is weekly and interval is 2, then the customer will be charged every two weeks. Defaults to 1. Example 1 |
day_of_month | number Day of month, from 1 to 28. This field is required if interval_unit is set to monthly. Defaults to 1. |
day_of_week | number Day of week number, from 0 (Sunday) to 6 (Saturday). This field is required if |
auto_retries_max_attempts | null or number The maximum number of times the payments from this subscription could be automatically retried. |
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": "Some subscription description",
- "customer_id": "CS9PL8eeo8aB",
- "payment_method_id": "PMBja4YZ2GDR",
- "interval_unit": "monthly",
- "day_of_month": 1,
- "metadata": {
- "some": "metadata"
}
}
Response samples
- 200
- 401
- 422
{- "data": {
- "amount": 100,
- "auto_retries_max_attempts": null,
- "count": null,
- "created_at": "2023-02-27T12:11:18-03:00",
- "currency": "ARS",
- "customer": {
- "created_at": "2023-02-27T12:10:11-03:00",
- "deleted_at": null,
- "email": null,
- "gateway_identifier": "290",
- "id": "CSbJrDMpVwaW",
- "identification_number": null,
- "identification_type": null,
- "livemode": false,
- "metadata": null,
- "mobile_number": null,
- "name": null,
- "object": "customer",
- "updated_at": "2023-02-27T12:10:11-03:00"
}, - "day_of_month": 1,
- "day_of_week": null,
- "description": "My Subscription",
- "first_date": "2023-03-01",
- "id": "SBJ843BlLBbd5Y",
- "interval": 1,
- "interval_unit": "monthly",
- "livemode": false,
- "metadata": null,
- "object": "subscription",
- "payment_method": {
- "card": {
- "country": "AR",
- "expiration_month": 12,
- "expiration_year": 2030,
- "fingerprint": "spnkdn504cBwsJbN",
- "funding": "debit",
- "issuer": null,
- "last_four_digits": "4905",
- "name": "Visa",
- "network": "visa",
- "providers": {
- "available": [
- "fiserv-argentina",
- "mercado-pago",
- "payway",
- "wompi"
], - "preferred": "fiserv-argentina"
}
}, - "created_at": "2023-02-27T12:09:59-03:00",
- "id": "PMVExkx45kMK",
- "livemode": false,
- "metadata": null,
- "object": "payment_method",
- "type": "card",
- "updated_at": "2023-02-27T12:09:59-03:00"
}, - "start_date": "2023-02-27",
- "status": "active",
- "upcoming_dates": [
- "2023-03-01",
- "2023-04-01",
- "2023-05-01",
- "2023-06-01",
- "2023-07-01"
], - "updated_at": "2023-02-27T12:11:18-03:00"
}
}
Pause a subscription
Pause a subscription.
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/subscriptions/SBmX1MrZ77Mwq3/actions/pause \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 201
- 401
- 422
{- "data": {
- "id": "SBmQ6j9NWxblNv",
- "object": "subscription",
- "amount": 12.5,
- "description": "Ajuste por deuda pasada",
- "currency": "ARS",
- "status": "active",
- "count": 12,
- "start_date": "2022-08-04",
- "interval_unit": "monthly",
- "interval": 1,
- "day_of_month": 0,
- "day_of_week": null,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "auto_retries_max_attempts": null,
- "first_date": "2022-08-04",
- "upcoming_dates": [
- "2022-09-04",
- "2022-10-04",
- "2022-11-04",
- "2022-12-04",
- "2023-01-04"
], - "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"
}
}
}
Resume a subscription
Resume a subscription.
Authorizations:
path Parameters
id required | string Example: SBmX1MrZ77Mwq3 Subscription ID. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request POST \ --url https://api.debi.pro/v1/subscriptions/SBmX1MrZ77Mwq3/actions/resume \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 201
- 401
- 422
{- "data": {
- "id": "SBmQ6j9NWxblNv",
- "object": "subscription",
- "amount": 12.5,
- "description": "Ajuste por deuda pasada",
- "currency": "ARS",
- "status": "active",
- "count": 12,
- "start_date": "2022-08-04",
- "interval_unit": "monthly",
- "interval": 1,
- "day_of_month": 0,
- "day_of_week": null,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "auto_retries_max_attempts": null,
- "first_date": "2022-08-04",
- "upcoming_dates": [
- "2022-09-04",
- "2022-10-04",
- "2022-11-04",
- "2022-12-04",
- "2023-01-04"
], - "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"
}
}
}
Cancel a subcription
This action cancels and archive the subscription. Also cancel the payments related to it.
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/subscriptions/SBmX1MrZ77Mwq3/actions/cancel \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 201
- 401
- 422
{- "data": {
- "id": "SBmQ6j9NWxblNv",
- "object": "subscription",
- "amount": 12.5,
- "description": "Ajuste por deuda pasada",
- "currency": "ARS",
- "status": "active",
- "count": 12,
- "start_date": "2022-08-04",
- "interval_unit": "monthly",
- "interval": 1,
- "day_of_month": 0,
- "day_of_week": null,
- "livemode": true,
- "created_at": "2022-02-11T23:19:22-03:00",
- "updated_at": "2022-02-11T23:19:22-03:00",
- "auto_retries_max_attempts": null,
- "first_date": "2022-08-04",
- "upcoming_dates": [
- "2022-09-04",
- "2022-10-04",
- "2022-11-04",
- "2022-12-04",
- "2023-01-04"
], - "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"
}
}
}
Search subscriptions
Search subscriptions.
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/subscriptions/search?q=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&page=SOME_STRING_VALUE' \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 401
{- "data": [
- {
- "id": "SBmQ6j9NWxblNv",
- "object": "subscription",
- "amount": 5200,
- "description": "Cuota mensual",
- "currency": "ARS",
- "status": "active",
- "auto_retries_max_attempts": null,
- "count": null,
- "start_date": "2021-07-01",
- "interval_unit": "monthly",
- "interval": 1,
- "day_of_month": 1,
- "day_of_week": null,
- "livemode": true,
- "created_at": "2021-07-01T12:24:32-03:00",
- "updated_at": "2021-07-01T12:24:32-03:00",
- "first_date": "2022-09-01",
- "upcoming_dates": [
- "2022-09-01",
- "2022-10-01",
- "2022-11-01",
- "2022-12-01",
- "2023-01-01"
], - "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
}, - "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"
}, - "metadata": null
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500
}
}
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.
id | string Unique identifier for the object. |
object | string Value: "webhook" |
url | string <= 5000 characters The URL of the webhook endpoint. |
enabled | boolean Whether the webhook is enabled. |
enabled_events | Array of strings One of: |
secret | string <= 5000 characters The endpoint's secret, used to generate webhook signatures. |
failed_lately_count | integer <int32> |
success_lately_count | integer <int32> |
livemode | boolean Has the value |
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: |
{- "created_at": "2022-02-11T23:19:22-03:00",
- "enabled": true,
- "enabled_events": [
- "*"
], - "id": "WHq4VzyAzDgB",
- "livemode": true,
- "object": "webhook",
- "secret": "DmUeH9E9yJ7ax9IYQVm9HpQ3VWvIx0",
- "updated_at": "2022-02-11T23:19:22-03:00",
}
List all webhooks
Returns a list of your webhooks.
Authorizations:
query Parameters
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/webhooks?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-11T23:19:22-03:00",
- "enabled": true,
- "enabled_events": [
- "*"
], - "id": "WHq4VzyAzDgB",
- "livemode": true,
- "object": "webhook",
- "secret": "DmUeH9E9yJ7ax9IYQVm9HpQ3VWvIx0",
- "updated_at": "2022-02-11T23:19:22-03:00",
}
], - "links": {
}, - "meta": {
- "per_page": 25,
- "total": 2500,
- "next_cursor": null,
- "prev_cursor": null
}
}
Create a webhook
Create a webhook.
Authorizations:
Request Body schema: application/jsonrequired
enabled_events | Array of strings Items 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" The list of events to enable for this endpoint. You may specify |
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 |
url required | string The URL of the webhook endpoint. |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{
}
Response samples
- 201
- 401
- 422
{- "data": {
- "created_at": "2022-02-11T23:19:22-03:00",
- "enabled": true,
- "enabled_events": [
- "*"
], - "id": "WHq4VzyAzDgB",
- "livemode": true,
- "object": "webhook",
- "secret": "DmUeH9E9yJ7ax9IYQVm9HpQ3VWvIx0",
- "updated_at": "2022-02-11T23:19:22-03:00",
}
}
Retrieve a webhook
Retrieves a webhook.
Authorizations:
path Parameters
id required | string Example: WHq4VzyAzDgB Webhook 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/webhooks/WHq4VzyAzDgB \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 200
- 404
{- "data": {
- "created_at": "2022-02-11T23:19:22-03:00",
- "enabled": true,
- "enabled_events": [
- "*"
], - "id": "WHq4VzyAzDgB",
- "livemode": true,
- "object": "webhook",
- "secret": "DmUeH9E9yJ7ax9IYQVm9HpQ3VWvIx0",
- "updated_at": "2022-02-11T23:19:22-03:00",
}
}
Update a webhook
Updates a webhook.
Authorizations:
path Parameters
id required | string Example: WHq4VzyAzDgB Webhook ID. |
Request Body schema: application/jsonoptional
url | string |
Responses
Request samples
- Payload
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
{
}
Response samples
- 200
- 401
- 422
{- "data": {
- "created_at": "2022-02-11T23:19:22-03:00",
- "enabled": true,
- "enabled_events": [
- "*"
], - "id": "WHq4VzyAzDgB",
- "livemode": true,
- "object": "webhook",
- "secret": "DmUeH9E9yJ7ax9IYQVm9HpQ3VWvIx0",
- "updated_at": "2022-02-11T23:19:22-03:00",
}
}
Delete a webhook
Delete a webhook.
Authorizations:
path Parameters
id required | string Example: WHq4VzyAzDgB Webhook ID. |
Responses
Request samples
- Shell + Curl
- Node + Request
- Php + Http1
- Python + Requests
- Java + Unirest
- Ruby + Native
curl --request DELETE \ --url https://api.debi.pro/v1/webhooks/WHq4VzyAzDgB \ --header 'Authorization: Bearer sk_live_...'
Response samples
- 401
{- "data": {
- "message": "Unauthorized"
}
}