Skip to content

Initiate a collection

POSThttps://api.gravv.xyz/v1/collections

Initiates a collection request using a specified collection method (card, bank transfer, and mobile money).

If the collection method is card, a payment link will be generated for the customer to complete the payment. For mobile money and bank transfer methods, payment instructions will be provided.

Body Params

  • amountstringrequired

    Amount to collect

  • currencystringrequired

    Three-letter uppercase ISO 4217 currency code

  • countrystringrequired

    Alpha-2 country code

  • customer_idstringrequired

    Unique customer identifier

  • client_customer_idstringrequired

    A unique identifier assigned by the client to reference the customer when storing payment details

  • client_referencestringrequired

    Client unique reference

  • metadataobject

    Custom JSON data that will be returned in webhook notifications for this transaction

  • sourceobjectrequired
  • destinationobjectrequired

Headers

  • Idempotency-Keystring

    A unique key to prevent duplicate requests.

Responses

Language
curl --request POST \
--url 'https://api.gravv.xyz/v1/collections' \
--header 'Api-Key: <Api Key>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"amount": "50",
"currency": "USD",
"country": "NG",
"customer_id": "04dfb2e5-1274-4214-b5fd-3415fde7dc17",
"client_customer_id": "checkers_user",
"client_reference": "9d8184a1-4a19-b74d-4797-9896aed01332",
"source": {
"source_type": "external",
"methods": [
"card"
]
},
"destination": {
"id": "bccb74d8-9715-478d-bcac-9d8184a19530",
"destination_type": "internal_crypto_wallet"
},
"metadata": {
"something": "i can share"
}
}'
{
"data": {
"amount": "50",
"client_reference": "trasdfausdaa",
"country": "KE",
"currency": "USD",
"onramp_status": "initialized",
"payment_link": "https://pay-staging.gravv.xyz?transaction_id=07b655cc-3dbd-4f6c-a16c-4657946d2e08",
"raw_payment_link": "https://provider.example/checkout/polygon/purchase...",
"transaction_id": "07b655cc-3dbd-4f6c-a16c-4657946d2e08",
"status": "created"
},
"error": null
}