Skip to main content

Create Refund

POST 

/v2/deposits/:depositId/refunds

Feature in development

Create a deposit refund request. Not all deposit payment options are refundable. Refunds are supported for the following deposit payment options:

  • BANK_TRANSFER
  • CARD

Additionally, a refund requires completing the deposit and completing the internal reconciliation process. The refundable flag allows us to track if a deposit is refundable.

Refund criteria:

  • Deposit status must be COMPLETED
  • Deposit must have refundable flag set to true.
  • One refund per deposit is allowed.
  • The wallet account funding the refund must have the required refund amount
  • Refund is only forwarded back to the instrument associated with the deposit
  • Refund amount is up to the deposit amount (partial refund is possible).
  • Refund currency is the same as the deposit currency

Refunds are created in a PREVIEW state. It establishes the Refund resource and validates the refund parameters.

To move the payment forward you must request a status change using POST /v2/deposits/{depositId}/refunds/{refundId}/status. This will move the refund to PENDING state.

{
"status": "PENDING"
}

To confirm the refund for execution use POST /v2/deposits/{depositId}/refunds/{refundId}/status:

{
"status": "PROCESSING"
}

Poll for status or leverage webhooks to track the refund progress.

To navigate to a deposit based on transactionId from transaction history use GET /v2/customers/{customerId}/deposits?fundingTransaction={transactionId}, which returns a deposit object for a specific transaction.

Request

Path Parameters

    depositId stringrequired

    Deposit id.

Body

Trigger refund for a deposit.

    amount int64required

    Refund amount in currency minor units. Refund amount can not exceed the refunded payment amount.

    currencyCode Currency (string)required

    Possible values: >= 3 characters and <= 3 characters

    Currency alphabetic code as specified by ISO 4217

    merchantRefNum MerchantReferenceNumber (string)

    Possible values: <= 255 characters

    This is the merchant reference number created by the merchant and submitted as part of the request. It must be unique for each request and allows cross referencing objects from merchant system to embedded wallet objects.

Responses

OK

Schema

    amount int64required

    Refund amount in currency minor units. Refund amount can not exceed the refunded payment amount.

    currencyCode Currency (string)required

    Possible values: >= 3 characters and <= 3 characters

    Currency alphabetic code as specified by ISO 4217

    merchantRefNum MerchantReferenceNumber (string)

    Possible values: <= 255 characters

    This is the merchant reference number created by the merchant and submitted as part of the request. It must be unique for each request and allows cross referencing objects from merchant system to embedded wallet objects.

    id stringrequired

    Refund id generated during creation.

    customerId stringrequired

    Customer id.

    accountId stringrequired

    The account funding the refund. Account id deduced from the relevant deposit.

    slipId string

    Slip identifier. Slip contains list of transactions associated with the withdrawal operations.

    fundingTransactionId string

    Deposit funding transaction id.

    refundTransactionId string

    Refund funding transaction id.

    creationTime date-timerequired

    Represents RFC 3339, section 5.6 date-time.

    expirationTime date-time

    Represents RFC 3339, section 5.6 date-time.

    paymentOption PaymentOptionType (string)required

    Possible values: [RAPID_TRANSFER, BANK_TRANSFER, OFFLINE_BANK_TRANSFER, CARD, PAYSAFECASH, PAGO_EFECTIVO]

    Enumeration of supported Payment Option Types

    status Payment Status (string)required

    Possible values: [PREVIEW, PENDING, PROCESSING, COMPLETED, FAILED, CANCELLED, REFUNDED]

    The payment status:

    • PREVIEW - Payment preview.
    • PENDING - Payment transaction is created and further action is required by the customer.
    • PROCESSING - Payment is scheduled for processing by the payment provider.
    • COMPLETED - Payment is completed. Note that some transactions might be completed from Embedded Wallet point of view, but not from customer point of view, since money movement might take some time outside of the Embedded Wallet network.
    • FAILED - Payment has failed. Check STATUS_REASON property for details.
    • CANCELLED - Payment have been cancelled
    • REFUNDED - Payment has been refunded. Valid only for deposits.
    statusReason string

    Possible values: <= 60 characters

    Status reason for FAILED transaction.

    nextStatus Payment Status (string)[]

    Possible values: [PREVIEW, PENDING, PROCESSING, COMPLETED, FAILED, CANCELLED, REFUNDED]

    Provides the next possible status update the client can request, depending on the chosen payment type and option.

Loading...