Create gift card¶
To create a gift card, you can use the following endpoint:
After creating the gift card, you must complete the payment process to activate the balance for the recipient
Body parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
sender.name | string | Yes | Full name of the sender |
sender.document_type | string | Yes | Type of ID (CC, PP, NIT, TI) |
sender.document_number | string | Yes | Sender's identification number |
sender.email | string | Yes | Sender's email address |
sender.address | string | Yes | Sender's physical address |
sender.phone | string | Yes | Sender's phone number |
sender.country_code | string | Yes | Country calling code (e.g., +57) |
recipient.name | string | Yes | Full name of recipient |
recipient.email | string | Yes | Recipient's email address |
amount | number | Yes | Gift card amount |
currency | string | Yes | Currency code (e.g., COP, USD) |
note | string | Yes | Note to show in the gift card |
external_ref_id | string | Yes | External identification ID for future payment references |
temp_webhook_url | string | Yes | Url of the webhook to which the payment notification will be sent by Autocore. It must be an endpoint that receives POST requests. |
success_url | string | Yes | URL to redirect to after a successful transaction |
failure_url | string | Yes | URL to redirect to after a failed transaction |
Body example¶
{
"sender": {
"name": "Jhon Doe",
"document_type": "CC",
"document_number": "11113333",
"email": "john.doe@example.com",
"address": "123 Main St",
"phone": "5551234",
"country_code": "+57"
},
"recipient": {
"name": "Jane Doe",
"email": "jane@mail.com"
},
"amount": 50000,
"currency": "COP",
"note":"Happy Birthday!",
"external_ref_id": "id_345",
"temp_webhook_url": "https://7099-181-204-153-195.ngrok-free.app/webhooks",
"success_url": "https://app-dev.autocore.pro/",
"failure_url": "https://app.autocore.pro/"
}
Endpoint response¶
Status code: 200¶
{
"msg": "Tarjeta de regalo creada correctamente",
"gift_card_code": "D32X693Q33",
"payment_link": "https://app-dev.autocore.pro/payment/marina/GC_4uykdvkhgb",
"payment_link_code": "GC_4uykdvkhgb"
}